{"id":13412445,"url":"https://github.com/rickb777/date","last_synced_at":"2026-03-01T01:37:34.889Z","repository":{"id":2582232,"uuid":"46753215","full_name":"rickb777/date","owner":"rickb777","description":"A Go package for working with dates","archived":false,"fork":false,"pushed_at":"2026-02-13T14:29:26.000Z","size":513,"stargazers_count":142,"open_issues_count":0,"forks_count":25,"subscribers_count":4,"default_branch":"v2","last_synced_at":"2026-02-13T21:47:23.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/rickb777/date/v2","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"fxtlabs/date","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rickb777.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-11-23T22:58:07.000Z","updated_at":"2026-02-13T14:29:30.000Z","dependencies_parsed_at":"2024-10-26T08:36:08.130Z","dependency_job_id":"5d74e134-7e4c-488b-80cf-fe57eacb89a9","html_url":"https://github.com/rickb777/date","commit_stats":null,"previous_names":[],"tags_count":98,"template":false,"template_full_name":null,"purl":"pkg:github/rickb777/date","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickb777%2Fdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickb777%2Fdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickb777%2Fdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickb777%2Fdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickb777","download_url":"https://codeload.github.com/rickb777/date/tar.gz/refs/heads/v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickb777%2Fdate/sbom","scorecard":{"id":775726,"data":{"date":"2025-08-11","repo":{"name":"github.com/rickb777/date","commit":"25b9090089e7c9e9f164c45366ef98dc2d4db35b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: goCommand not pinned by hash: coverage.sh:12","Info:   1 out of   2 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'v2'","Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T03:31:53.074Z","repository_id":2582232,"created_at":"2025-08-23T03:31:53.074Z","updated_at":"2025-08-23T03:31:53.074Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29957454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T22:53:01.873Z","status":"ssl_error","status_checked_at":"2026-02-28T22:52:50.699Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-07-30T20:01:24.752Z","updated_at":"2026-03-01T01:37:29.876Z","avatar_url":"https://github.com/rickb777.png","language":"Go","readme":"# date\n\n[![GoDoc](https://img.shields.io/badge/api-Godoc-blue.svg)](https://pkg.go.dev/github.com/rickb777/date/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rickb777/date)](https://goreportcard.com/report/github.com/rickb777/date/v2)\n[![Issues](https://img.shields.io/github/issues/rickb777/date.svg)](https://github.com/rickb777/date/issues)\n\nPackage `date` provides functionality for working with dates.\n\nThis package introduces a light-weight `Date` type that is storage-efficient\nand convenient for calendrical calculations and date parsing and formatting\n(including years outside the [0,9999] interval).\n\nIt also provides\n\n * `clock.Clock` which expresses a wall-clock style hours-minutes-seconds with millisecond precision.\n * `timespan.DateRange` which expresses a period between two dates.\n * `timespan.TimeSpan` which expresses a duration of time between two instants (see RFC5545).\n * `view.VDate` which wraps `Date` for use in templates etc.\n\nSee [package documentation](https://godoc.org/github.com/rickb777/date) for\nfull documentation and examples.\n\nSee also [period.Period](https://pkg.go.dev/github.com/rickb777/period), which implements periods corresponding\nto the ISO-8601 form (e.g. \"PT30S\").\n\n## Installation\n\n    go get github.com/rickb777/date/v2\n\n## Status\n\nThis library has been in reliable production use for some time. Versioning follows the well-known semantic version pattern.\n\n### Version 2\n\nChanges since v1:\n\n* The [period.Period](https://pkg.go.dev/github.com/rickb777/period) type has moved.\n* `clock.Clock` now has nanosecond resolution (formerly millisecond resolution). \n* `date.Date` is now an integer that holds the number of days since year zero. Previously, it was a struct based on year 1970.\n* `date.Date` time conversion methods have more explicit names - see table below.\n* `date.Date` arithmetic and comparison operations now rely on Go operators; the corresponding methods have been deleted - see table below.\n* `date.Date` zero value is now year 0 (Gregorian proleptic astronomical) so 1970 will no longer cause issues.\n* `date.PeriodOfDays` has been moved to `timespan.PeriodOfDays`\n* `date.DateString` has been deleted; the SQL `driver.Valuer` implementation is now pluggable and serves the same purpose more simply.\n\nRenamed methods:\n\n| Was               | Use instead             |\n|-------------------|-------------------------|\n| date.Date`.Local` | date.Date`.Midnight`    |\n| date.Date`.UTC`   | date.Date`.MidnightUTC` |\n| date.Date`.In`    | date.Date`.MidnightIn`  |\n\nDeleted methods and functions:\n\n| Was                            | Use instead        |\n|--------------------------------|--------------------|\n| date.Date.`Add`                | `+`                |\n| date.Date.`Sub`                | `-`                |\n| date.Date.`IsZero`             | `== 0`             |\n| date.Date.`Equal`              | `==`               |\n| date.Date.`Before`             | `\u003c`                |\n| date.Date.`After`              | `\u003e`                |\n| `date.IsLeap`                  | `gregorian.IsLeap` |\n| `date.DaysIn`                  | `gregorian.DaysIn` |\n| timespan.DateRange.`Normalise` | (not needed)       |\n\nAny v1 dates persistently stored as integers will be incorrect; these can be corrected by **adding 719162** (`date.ZeroOffset`) to them, which is the number of days between year zero (v2) and 1970 (v1). Dates stored as strings will be unaffected.\n\n## Credits\n\nThis package follows very closely the design of package\n[`time`](http://golang.org/pkg/time/) in the standard library;\nmany of the `Date` methods are implemented using the corresponding methods\nof the `time.Time` type and much of the documentation is copied directly\nfrom that package.\n\nThe original [Good Work](https://github.com/fxtlabs/date) on which this was\nbased was done by Filippo Tampieri at Fxtlabs.\n","funding_links":[],"categories":["Date and Time","日期和时间","Relational Databases","日期和时间`用于处理日期和时间的库`","\u003cspan id=\"日期和时间-date-and-time\"\u003e日期和时间 Date and Time\u003c/span\u003e"],"sub_categories":["Search and Analytic Databases","Advanced Console UIs","检索及分析资料库","SQL 查询语句构建库","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickb777%2Fdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickb777%2Fdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickb777%2Fdate/lists"}