{"id":20278561,"url":"https://github.com/wmentor/epoch","last_synced_at":"2025-11-29T19:06:16.368Z","repository":{"id":144227561,"uuid":"316315855","full_name":"wmentor/epoch","owner":"wmentor","description":"Time parsing/formating llibrary","archived":false,"fork":false,"pushed_at":"2020-11-26T19:33:10.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T06:54:19.734Z","etag":null,"topics":["date","dateformat","dateparser","datetime","go","golang","golang-library","library","time"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wmentor.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":"2020-11-26T19:03:16.000Z","updated_at":"2020-11-26T19:34:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ebba409-a3a4-437f-9d1a-b64618c5a860","html_url":"https://github.com/wmentor/epoch","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmentor%2Fepoch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmentor%2Fepoch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmentor%2Fepoch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmentor%2Fepoch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wmentor","download_url":"https://codeload.github.com/wmentor/epoch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241768282,"owners_count":20017129,"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","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":["date","dateformat","dateparser","datetime","go","golang","golang-library","library","time"],"created_at":"2024-11-14T13:24:09.223Z","updated_at":"2025-11-29T19:06:16.323Z","avatar_url":"https://github.com/wmentor.png","language":"Go","readme":"# epoch\n\nSimple time formating/parsing library written on pure Go.\n\n## Install\n\n```\ngo get github.com/wmentor/epoch\n```\n\n## Time format\n\n```go\npackage main\n\nimport (\n  \"time\"\n\n  \"github.com/wmentor/epoch\"\n)\n\nfunc main() {\n  println(epoch.Format(\"%Y-%m-%d %H:%M:%S\", time.Now()))\n}\n```\n\nFormat options:\n\n* %B - month \"January\";\n* %b - month short \"Jan\";\n* %m - minutes \"01\",\n* %A - week day \"Monday\",\n* %a - week day short \"Mon\",\n* %d - day \"02\",\n* %H - hours \"15\",\n* %I - zero hours 12 \"03\",\n* %M - minutes \"04\",\n* %S - seconds \"05\",\n* %Y - year \"2006\",\n* %y - year short \"06\",\n* %p - \"PM\",\n* %Z - \"MST\",\n* %z - time zone \"-0700\",\n* %L - trailing zeros \".000\".\n\n## Parse time\n\n```go\npackage main\n\nimport (\n  \"time\"\n\n  \"github.com/wmentor/epoch\"\n)\n\nfunc main() {\n  tm, err := epoch.Parse(\"2020-11-26 10:15:00 UTC\") // tm - time.Time\n  ...\n}\n```\n\nSupported time formats:\n\n```\n\"May 8, 2009 5:57:51 PM\"\n\"Mon Jan  2 15:04:05 2006\"\n\"Mon Jan  2 15:04:05 MST 2006\"\n\"Mon Jan 02 15:04:05 -0700 2006\"\n\"Monday, 02-Jan-06 15:04:05 MST\"\n\"Mon, 02 Jan 2006 15:04:05 MST\"\n\"Tue, 11 Jul 2017 16:28:13 +0200 (CEST)\"\n\"Mon, 02 Jan 2006 15:04:05 -0700\"\n\"Mon Aug 10 15:44:11 UTC+0100 2015\"\n\"Fri Jul 03 2015 18:04:07 GMT+0100 (GMT Daylight Time)\"\n\"12 Feb 2006, 19:17\"\n\"2013-Feb-03\"\n//   mm/dd/yy\n\"3/31/2014\"\n\"03/31/2014\"\n\"08/21/71\"\n\"8/1/71\"\n\"4/8/2014 22:05\"\n\"04/08/2014 22:05\"\n\"04/2/2014 03:00:51\"\n\"8/8/1965 12:00:00 AM\"\n\"8/8/1965 01:00:01 PM\"\n\"8/8/1965 01:00 PM\"\n\"8/8/1965 1:00 PM\"\n\"8/8/1965 12:00 AM\"\n\"4/02/2014 03:00:51\"\n\"03/19/2012 10:11:59\"\n\"03/19/2012 10:11:59.3186369\"\n// yyyy/mm/dd\n\"2014/3/31\"\n\"2014/03/31\"\n\"2014/4/8 22:05\"\n\"2014/04/08 22:05\"\n\"2014/04/2 03:00:51\"\n\"2014/4/02 03:00:51\"\n\"2012/03/19 10:11:59\"\n\"2012/03/19 10:11:59.3186369\"\n//   yyyy-mm-ddThh\n\"2006-01-02T15:04:05+0000\"\n\"2009-08-12T22:15:09-07:00\"\n\"2009-08-12T22:15:09\"\n\"2009-08-12T22:15:09Z\"\n//   yyyy-mm-dd hh:mm:ss\n\"2014-04-26 17:24:37.3186369\"\n\"2012-08-03 18:31:59.257000000\"\n\"2014-04-26 17:24:37.123\"\n\"2013-04-01 22:43:22\"\n\"2014-12-16 06:20:00 UTC\"\n\"2014-12-16 06:20:00 GMT\"\n\"2014-04-26 05:24:37 PM\"\n\"2014-04-26 13:13:43 +0800\"\n\"2014-04-26 13:13:44 +09:00\"\n\"2012-08-03 18:31:59.257000000 +0000 UTC\"\n\"2015-09-30 18:48:56.35272715 +0000 UTC\"\n\"2015-02-18 00:12:00 +0000 GMT\"\n\"2015-02-18 00:12:00 +0000 UTC\"\n\"2017-07-19 03:21:51+00:00\"\n\"2014-04-26\"\n\"2014-04\"\n\"2014\"\n\"2014-05-11 08:20:13,787\"\n//  yyyymmdd and similar\n\"20140601\"\n// unix seconds, ms\n\"1332151919\"\n\"1384216367189\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmentor%2Fepoch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwmentor%2Fepoch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmentor%2Fepoch/lists"}