{"id":13494550,"url":"https://github.com/ribice/dt","last_synced_at":"2025-03-21T12:33:02.151Z","repository":{"id":90772453,"uuid":"204677124","full_name":"ribice/dt","owner":"ribice","description":"Go's missing DateTime package","archived":false,"fork":false,"pushed_at":"2024-11-28T12:05:18.000Z","size":25,"stargazers_count":37,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T01:40:31.445Z","etag":null,"topics":["date","datetime","golang","library","time"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ribice.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}},"created_at":"2019-08-27T10:16:48.000Z","updated_at":"2024-11-28T12:05:22.000Z","dependencies_parsed_at":"2024-01-16T09:01:41.530Z","dependency_job_id":"9d4e5269-1015-4a38-9c07-a6116667121f","html_url":"https://github.com/ribice/dt","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribice%2Fdt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribice%2Fdt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribice%2Fdt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ribice%2Fdt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ribice","download_url":"https://codeload.github.com/ribice/dt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244799575,"owners_count":20512276,"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","datetime","golang","library","time"],"created_at":"2024-07-31T19:01:25.950Z","updated_at":"2025-03-21T12:33:02.136Z","avatar_url":"https://github.com/ribice.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# dt\nGo's missing DateTime package\n\n[![Build Status](https://travis-ci.org/ribice/dt.svg?branch=master)](https://travis-ci.org/ribice/dt)\n[![codecov](https://codecov.io/gh/ribice/dt/branch/master/graph/badge.svg)](https://codecov.io/gh/ribice/dt)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ribice/dt)](https://goreportcard.com/report/github.com/ribice/dt)\n\n## Why dt?\n\nGo's standard library contains a single date package - `time`. The type provided by it, `Time`, contains date, time and location information.\n\nMore often than not we don't need location info, or we need to represent date/time only.\n\ndt provides exactly that, a time-zone-independent representation of time that follows the rules of the proleptic Gregorian calendar with exactly 24-hour days, 60-minute hours, and 60-second minutes.\n\n## What is provided?\n\ndt provides three types to work with:\n\n- Time: Contains time info: HH:mm\n- Date: Contains date info: YYYY-MM-DD\n- DateTime: Contains date and time information: YYYY-MM-DDTHH:mm\n\nUnlike `time.Time` these types contain an additional `Valid` field representing whether the data inside it was scanned/marshaled. This prevents situations like saving default date in a database when nothing was received or responding via JSON with default date even though the date was empty.\n\nTypes provided in dt represent sql types `time`, `date` and `timestamp`.\n\n## Why not civil package?\n\nGoogle already offers something similar in [civil](https://github.com/googleapis/google-cloud-go/tree/master/civil) package.\n\n- It's not an independent library, but a small package in a very big project which leads to its problems.\n- It doesn't implement the Scan/Value SQL interfaces.\n- It marshalls to zero date/time/datetime (`time.Time` does this as well.) You can't differentiate inputted zero date/time/datetime and empty value.\n- Slower development cycle\n\n## License\n\ndt is licensed under the Apache2 license. Check the [LICENSE](LICENSE) file for details.\n\n## Author\n\n[Emir Ribic](https://dev.ribic.ba)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribice%2Fdt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fribice%2Fdt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fribice%2Fdt/lists"}