{"id":23066537,"url":"https://github.com/xjine/unity_datetimeutil","last_synced_at":"2025-10-10T20:12:56.129Z","repository":{"id":38345197,"uuid":"195951311","full_name":"XJINE/Unity_DateTimeUtil","owner":"XJINE","description":"Utility for System.Date.Time.","archived":false,"fork":false,"pushed_at":"2023-09-10T00:17:05.000Z","size":46,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T09:12:58.412Z","etag":null,"topics":["assets","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XJINE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-09T07:00:58.000Z","updated_at":"2022-06-23T10:54:43.000Z","dependencies_parsed_at":"2025-02-08T22:35:37.259Z","dependency_job_id":null,"html_url":"https://github.com/XJINE/Unity_DateTimeUtil","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/XJINE/Unity_DateTimeUtil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_DateTimeUtil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_DateTimeUtil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_DateTimeUtil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_DateTimeUtil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XJINE","download_url":"https://codeload.github.com/XJINE/Unity_DateTimeUtil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XJINE%2FUnity_DateTimeUtil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005265,"owners_count":26083861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assets","unity"],"created_at":"2024-12-16T05:13:31.335Z","updated_at":"2025-10-10T20:12:56.110Z","avatar_url":"https://github.com/XJINE.png","language":"C#","readme":"# Unity_DateTimeUtil\n\n``DateTimeUtil`` is just a static class. Not dependence on Unity.\n\n## Importing\n\nYou can use Package Manager or import it directly.\n\n```\nhttps://github.com/XJINE/Unity_DateTimeUtil.git?path=Assets/Packages/DateTimeUtil\n```\n\n## How to Use\n\n### Convert Day/Hour/Minute/Second\n\nMultiply these parameters.\n\n```csharp\npublic const float DayToHour        = 24;\npublic const float DayToMinute      = 24 * 60;\npublic const float DayToSecond      = 24 * 60 * 60;\npublic const float DayToMillisecond = 24 * 60 * 60 * 1000;\n\npublic const float HourToDay         = 1f / 24;\npublic const float HourToMinute      = 60;\npublic const float HourToSecond      = 60 * 60;\npublic const float HourToMillisecond = 60 * 60 * 1000;\n\npublic const float MinuteToDay         = 1f / 60 / 24;\npublic const float MinuteToHour        = 1f / 60;\npublic const float MinuteToSecond      = 60;\npublic const float MinuteToMillisecond = 60 * 1000;\n\npublic const float SecondToDay         = 1f / 60 / 60 / 24;\npublic const float SecondToHour        = 1f / 60 / 60;\npublic const float SecondToMinute      = 1f / 60;\npublic const float SecondToMillisecond = 1000;\n\npublic const float MillisecondToDay     = 1f / 1000 / 60 / 60 / 24;\npublic const float MillisecondToHour    = 1f / 1000 / 60 / 60;\npublic const float MillisecondToMinute  = 1f / 1000 / 60;\npublic const float MillisecondToSecond  = 1f / 1000;\n```\n\nor use ``public static float DateTimeNowInSecond;`` property.\n\n### Convert to string\n\nUse popular format or the properties.\n\n```csharp\n\npublic static string DateTimeFormatHMSF   = \"HH:mm:ss:ff\";\npublic static string DateTimeFormatYMDHMS = \"yy/MM/dd HH:mm:ss\";\n\npublic static string DateTimeNowInHMSF;\npublic static string DateTimeNowInYMDHMS;\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxjine%2Funity_datetimeutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxjine%2Funity_datetimeutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxjine%2Funity_datetimeutil/lists"}