{"id":13412484,"url":"https://github.com/GuilhermeCaruso/kair","last_synced_at":"2025-03-14T18:31:35.138Z","repository":{"id":57483153,"uuid":"151437885","full_name":"GuilhermeCaruso/kair","owner":"GuilhermeCaruso","description":":clock1: Date and Time - Golang Formatting Library","archived":false,"fork":false,"pushed_at":"2020-06-18T03:06:36.000Z","size":15,"stargazers_count":24,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-25T22:45:41.824Z","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/GuilhermeCaruso.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}},"created_at":"2018-10-03T15:44:07.000Z","updated_at":"2024-06-23T06:09:32.000Z","dependencies_parsed_at":"2022-08-27T21:02:21.801Z","dependency_job_id":null,"html_url":"https://github.com/GuilhermeCaruso/kair","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhermeCaruso%2Fkair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhermeCaruso%2Fkair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhermeCaruso%2Fkair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuilhermeCaruso%2Fkair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuilhermeCaruso","download_url":"https://codeload.github.com/GuilhermeCaruso/kair/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221495303,"owners_count":16832455,"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-07-30T20:01:25.199Z","updated_at":"2024-10-26T04:30:41.051Z","avatar_url":"https://github.com/GuilhermeCaruso.png","language":"Go","funding_links":[],"categories":["日期和时间`用于处理日期和时间的库`","Date and Time","日期和时间","Relational Databases"],"sub_categories":["SQL 查询语句构建库","Search and Analytic Databases","Advanced Console UIs","检索及分析资料库"],"readme":"\n\u003cp align=\"center\" \u003e\n    \u003cimg width=\"500\" src =\"https://i.imgur.com/AqveQES.png\" /\u003e\n\u003c/p\u003e\n\n# Kair\n\u003e Date and Time - Golang Formatting Library\n\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Go Report Card](https://goreportcard.com/badge/github.com/GuilhermeCaruso/kair)](https://goreportcard.com/report/github.com/GuilhermeCaruso/kair) [![codecov](https://codecov.io/gh/GuilhermeCaruso/kair/branch/master/graph/badge.svg)](https://codecov.io/gh/GuilhermeCaruso/kair) [![Build Status](https://travis-ci.com/GuilhermeCaruso/kair.svg?branch=master)](https://travis-ci.com/GuilhermeCaruso/kair) ![GitHub](https://img.shields.io/badge/golang%20-\u003e=1.6.3-blue.svg) [![GoDoc](https://godoc.org/github.com/GuilhermeCaruso/kair?status.svg)](https://godoc.org/github.com/GuilhermeCaruso/kair) \n\n## Setup\n\nTo get Kair\n\n##### \u003e Go CLI\n```sh\ngo get github.com/GuilhermeCaruso/kair\n```\n##### \u003e Go DEP\n```sh\ndep ensure -add github.com/GuilhermeCaruso/kair\n```\n##### \u003e Govendor\n```sh\ngovendor fetch github.com/GuilhermeCaruso/kair\n```\n\n## Example\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\tk \"github.com/GuilhermeCaruso/kair\"\n)\n\nfunc main() {\n\tnow := k.Now()\n\n    fmt.Printf(\"Right now is %s \\n\", now.CustomFormat(\"dd/MM/YYYY hh:mm:ss\"))\n\n\tdate := k.Date(29, 05, 1980)\n\n\tfmt.Printf(\"The %s was a %s in %s\\n\",\n\t\tdate.Format(\"L\"),\n\t\tdate.CustomFormat(\"DD\"),\n        date.CustomFormat(\"MMMM\")) //The 29/05/1980 was a Thursday in May \n}\n\n```\n\n## Formatters\n- Standard\n```sh\n    \"LT\":   10:20 AM,\n    \"LTS\":  10:20:00 AM,\n    \"L\":    20/05/2018,\n    \"l\":    20/5/2018,\n    \"LL\":   May 20, 2018,\n    \"ll\":   May 20, 2018,\n    \"LLL\":  May 20, 2018 10:20 AM,\n    \"lll\":  May 20, 2018 10:20 AM,\n    \"LLLL\": Sunday, May 20, 2018 10:20 AM,\n    \"llll\": Sun, May 20, 2018 10:20 AM,\n    \"\":     2018-05-20 10:20:00 +0000 UTC,\n```\n\n- Custom\n```sh\n    \"MMMM\": Long Month,\n    \"MMM\":  Month,\n    \"MM\":   Zero Number Month,\n    \"M\":    Number Month,\n    \"YYYY\": Long Year,\n    \"YY\":   Year,\n    \"DD\":   Long Day,\n    \"D\":    Day,\n    \"dd\":   Long Number Day,\n    \"d\":    Number Day,\n    \"hh\":   Long Hour,\n    \"h\":    Hour,\n    \"mm\":   Long Minute,\n    \"m\":    Minute,\n    \"ss\":   Long Second,\n    \"s\":    Second\n```\n\n## Contributing\nPlease feel free to make suggestions, create issues, fork the repository and send pull requests!\n\n## To do:\n- [X] Implement Standard Format\n- [X] Implement Custom Format\n- [X] Implement Now(), Date() and DateTime() initializers\n- [ ] Implement Relative Time (FromNow, StartOf ...)\n- [ ] Implement CalendarTime (add, subtract, calendar)\n\n## License\n\nMIT License © Guilherme Caruso\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGuilhermeCaruso%2Fkair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGuilhermeCaruso%2Fkair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGuilhermeCaruso%2Fkair/lists"}