{"id":16539493,"url":"https://github.com/al3rez/cstrftime","last_synced_at":"2025-10-28T09:37:52.135Z","repository":{"id":57518743,"uuid":"130918040","full_name":"al3rez/cstrftime","owner":"al3rez","description":"⌛️The missing strftime in Go","archived":false,"fork":false,"pushed_at":"2018-05-06T17:06:31.000Z","size":5,"stargazers_count":25,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-19T02:10:59.999Z","etag":null,"topics":["cgo","golang","strftime"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/al3rez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-24T21:55:03.000Z","updated_at":"2024-06-19T02:11:00.000Z","dependencies_parsed_at":"2022-09-26T17:01:22.974Z","dependency_job_id":null,"html_url":"https://github.com/al3rez/cstrftime","commit_stats":null,"previous_names":["cooldrip/cstrftime"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fcstrftime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fcstrftime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fcstrftime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/al3rez%2Fcstrftime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/al3rez","download_url":"https://codeload.github.com/al3rez/cstrftime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219859408,"owners_count":16556036,"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":["cgo","golang","strftime"],"created_at":"2024-10-11T18:49:17.269Z","updated_at":"2025-10-28T09:37:47.111Z","avatar_url":"https://github.com/al3rez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⌛️cstrftime [![GoDoc](https://godoc.org/github.com/cooldrip/cstrftime?status.svg)](https://godoc.org/github.com/cooldrip/cstrftime) [![codecov](https://codecov.io/gh/cooldrip/cstrftime/branch/master/graph/badge.svg)](https://codecov.io/gh/cooldrip/cstrftime) [![Build Status](https://travis-ci.org/cooldrip/cstrftime.svg?branch=master)](https://travis-ci.org/cooldrip/cstrftime)\n\nThe missing strftime in Go.\n\n## Installation\n\n```\n\u003e go get github.com/cooldrip/cstrftime\n```\n\n## Example\n\n```go\npackage main\n\nimport \"github.com/cooldrip/cstrftime\"\n\nfunc main() {\n\tt := time.Now()\n\tfmt.Println(cstrftime.Format(\"%d\", t)) // 25\n\tfmt.Println(cstrftime.Format(\"%M\", t)) // 54\n\t// etc.\n}\n```\n\n## Directives\n\n| Code  | Meaning                                                                                                                                                                          | Example                    |\n| ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |\n| `%a`  | Weekday as locale’s abbreviated name.                                                                                                                                            | `Mon`                      |\n| `%A`  | Weekday as locale’s full name.                                                                                                                                                   | `Monday`                   |\n| `%w`  | Weekday as a decimal number, where 0 is Sunday and 6 is Saturday.                                                                                                                | `1`                        |\n| `%d`  | Day of the month as a zero-padded decimal number.                                                                                                                                | `30`                       |\n| `%-d` | Day of the month as a decimal number. (Platform specific)                                                                                                                        | `30`                       |\n| `%b`  | Month as locale’s abbreviated name.                                                                                                                                              | `Sep`                      |\n| `%B`  | Month as locale’s full name.                                                                                                                                                     | `September`                |\n| `%m`  | Month as a zero-padded decimal number.                                                                                                                                           | `09`                       |\n| `%-m` | Month as a decimal number. (Platform specific)                                                                                                                                   | `9`                        |\n| `%y`  | Year without century as a zero-padded decimal number.                                                                                                                            | `13`                       |\n| `%Y`  | Year with century as a decimal number.                                                                                                                                           | `2013`                     |\n| `%H`  | Hour (24-hour clock) as a zero-padded decimal number.                                                                                                                            | `07`                       |\n| `%-H` | Hour (24-hour clock) as a decimal number. (Platform specific)                                                                                                                    | `7`                        |\n| `%I`  | Hour (12-hour clock) as a zero-padded decimal number.                                                                                                                            | `07`                       |\n| `%-I` | Hour (12-hour clock) as a decimal number. (Platform specific)                                                                                                                    | `7`                        |\n| `%p`  | Locale’s equivalent of either AM or PM.                                                                                                                                          | `AM`                       |\n| `%M`  | Minute as a zero-padded decimal number.                                                                                                                                          | `06`                       |\n| `%-M` | Minute as a decimal number. (Platform specific)                                                                                                                                  | `6`                        |\n| `%S`  | Second as a zero-padded decimal number.                                                                                                                                          | `05`                       |\n| `%-S` | Second as a decimal number. (Platform specific)                                                                                                                                  | `5`                        |\n| `%f`  | Microsecond as a decimal number, zero-padded on the left.                                                                                                                        | `000000`                   |\n| `%z`  | UTC offset in the form +HHMM or -HHMM (empty string if the the object is naive).                                                                                                 | `+0430`                    |\n| `%Z`  | Time zone name (empty string if the object is naive).                                                                                                                            | `+0430 (macOS)`            |\n| `%j`  | Day of the year as a zero-padded decimal number.                                                                                                                                 | `273`                      |\n| `%-j` | Day of the year as a decimal number. (Platform specific)                                                                                                                         | `273`                      |\n| `%U`  | Week number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0. | `39`                       |\n| `%W`  | Week number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0.             | `39`                       |\n| `%c`  | Locale’s appropriate date and time representation.                                                                                                                               | `Mon Sep 30 07:06:05 2013` |\n| `%x`  | Locale’s appropriate date representation.                                                                                                                                        | `09/30/13`                 |\n| `%X`  | Locale’s appropriate time representation.                                                                                                                                        | `07:06:05`                 |\n| `%%`  | A literal '%' character.                                                                                                                                                         | `%`                        |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3rez%2Fcstrftime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal3rez%2Fcstrftime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3rez%2Fcstrftime/lists"}