{"id":16306023,"url":"https://github.com/songmu/go-httpdate","last_synced_at":"2025-03-22T20:32:57.821Z","repository":{"id":57489125,"uuid":"109563429","full_name":"Songmu/go-httpdate","owner":"Songmu","description":"Well parsing and dealing the various date formats automatically","archived":false,"fork":false,"pushed_at":"2018-10-14T06:26:14.000Z","size":22,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-11T21:09:24.633Z","etag":null,"topics":[],"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/Songmu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-05T09:34:38.000Z","updated_at":"2022-10-03T16:07:05.000Z","dependencies_parsed_at":"2022-08-29T22:11:43.819Z","dependency_job_id":null,"html_url":"https://github.com/Songmu/go-httpdate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Songmu%2Fgo-httpdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Songmu%2Fgo-httpdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Songmu%2Fgo-httpdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Songmu%2Fgo-httpdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Songmu","download_url":"https://codeload.github.com/Songmu/go-httpdate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221839136,"owners_count":16889590,"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":[],"created_at":"2024-10-10T21:09:27.520Z","updated_at":"2024-10-28T14:16:41.300Z","avatar_url":"https://github.com/Songmu.png","language":"Go","readme":"go-httpdate\n=======\n\n[![Build Status](https://travis-ci.org/Songmu/go-httpdate.png?branch=master)][travis]\n[![Coverage Status](https://coveralls.io/repos/Songmu/go-httpdate/badge.png?branch=master)][coveralls]\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]\n[![GoDoc](https://godoc.org/github.com/Songmu/go-httpdate?status.svg)][godoc]\n\n[travis]: https://travis-ci.org/Songmu/go-httpdate\n[coveralls]: https://coveralls.io/r/Songmu/go-httpdate?branch=master\n[license]: https://github.com/Songmu/go-httpdate/blob/master/LICENSE\n[godoc]: https://godoc.org/github.com/Songmu/go-httpdate\n\n## Description\n\nWell dealing the date formats used by the HTTP protocol (and then some more).  \n`Str2Time` is tremendous function which can detect various date formats from string and returns `time.Time`.\n\nIs is golang porting of perl's [HTTP::Date](https://metacpan.org/pod/HTTP::Date) (ported only `str2time` interface)\n\n## Synopsis\n\n    # try to parse string and returns `time.Time` or error\n    t1, err := httpdate.Str2Time(\"Thu, 03 Feb 1994 12:33:44 GMT\", time.UTC)\n    t2, err := httpdate.Str2Time(\"2017-11-11\", time.UTC)\n    t3, err := httpdate.Str2Time(\"Thu Nov  9 18:20:31 GMT 2017\", time.UTC)\n    t4, err := httpdate.Str2Time(\"08-Feb-94 14:15:29 GMT\", time.UTC)\n\n## Supported Format\n\n-  \"Wed, 09 Feb 1994 22:23:32 GMT\"       -- HTTP format\n-  \"Thu Feb  3 17:03:55 GMT 1994\"        -- ctime(3) format\n-  \"Thu Feb  3 00:00:00 1994\",           -- ANSI C asctime() format\n-  \"Tuesday, 08-Feb-94 14:15:29 GMT\"     -- old rfc850 HTTP format\n-  \"Tuesday, 08-Feb-1994 14:15:29 GMT\"   -- broken rfc850 HTTP format\n-  \"03/Feb/1994:17:03:55 -0700\"   -- common logfile format\n-  \"09 Feb 1994 22:23:32 GMT\"     -- HTTP format (no weekday)\n-  \"08-Feb-94 14:15:29 GMT\"       -- rfc850 format (no weekday)\n-  \"08-Feb-1994 14:15:29 GMT\"     -- broken rfc850 format (no weekday)\n-  \"1994-02-03 14:15:29 -0100\"    -- ISO 8601 format\n-  \"1994-02-03 14:15:29\"          -- zone is optional\n-  \"1994-02-03\"                   -- only date\n-  \"1994-02-03T14:15:29\"          -- Use T as separator\n-  \"19940203T141529Z\"             -- ISO 8601 compact format\n-  \"19940203\"                     -- only date\n-  \"08-Feb-94\"         -- old rfc850 HTTP format    (no weekday, no time)\n-  \"08-Feb-1994\"       -- broken rfc850 HTTP format (no weekday, no time)\n-  \"09 Feb 1994\"       -- proposed new HTTP format  (no weekday, no time)\n-  \"03/Feb/1994\"       -- common logfile format     (no time, no offset)\n-  \"Feb  3  1994\"      -- Unix 'ls -l' format\n-  \"Feb  3 17:03\"      -- Unix 'ls -l' format\n-  \"11-15-96  03:52PM\" -- Windows 'dir' format\n\n## See Also\n\n- [HTTP::Date](https://metacpan.org/pod/HTTP::Date)\n\n## Author\n\n[Songmu](https://github.com/Songmu)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongmu%2Fgo-httpdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsongmu%2Fgo-httpdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongmu%2Fgo-httpdate/lists"}