{"id":13408298,"url":"https://github.com/samsonjs/strftime","last_synced_at":"2026-02-21T01:32:00.569Z","repository":{"id":41570945,"uuid":"1072788","full_name":"samsonjs/strftime","owner":"samsonjs","description":"strftime for JavaScript","archived":false,"fork":false,"pushed_at":"2024-10-31T18:55:21.000Z","size":257,"stargazers_count":659,"open_issues_count":8,"forks_count":99,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-23T05:38:51.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://samhuri.net/projects/strftime","language":"JavaScript","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/samsonjs.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":null,"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":"2010-11-11T21:17:25.000Z","updated_at":"2025-09-16T07:13:12.000Z","dependencies_parsed_at":"2024-05-28T22:24:02.947Z","dependency_job_id":"e614f2e7-2e7a-41c4-be81-9139a663e8f0","html_url":"https://github.com/samsonjs/strftime","commit_stats":{"total_commits":180,"total_committers":20,"mean_commits":9.0,"dds":0.5222222222222221,"last_synced_commit":"93aaf1eac6ef3fcfe30149a045b41dca51567726"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/samsonjs/strftime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsonjs%2Fstrftime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsonjs%2Fstrftime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsonjs%2Fstrftime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsonjs%2Fstrftime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samsonjs","download_url":"https://codeload.github.com/samsonjs/strftime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samsonjs%2Fstrftime/sbom","scorecard":{"id":798139,"data":{"date":"2025-08-11","repo":{"name":"github.com/samsonjs/strftime","commit":"f2d5290d284379c5266543a1dc37ec5de6fd428c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"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":"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":"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":"Code-Review","score":1,"reason":"Found 3/23 approved changesets -- score normalized to 1","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"Maintained","score":0,"reason":"0 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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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"}},{"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":"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 'main'"],"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 13 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"}}]},"last_synced_at":"2025-08-23T09:37:01.029Z","repository_id":41570945,"created_at":"2025-08-23T09:37:01.029Z","updated_at":"2025-08-23T09:37:01.029Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29670124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"ssl_error","status_checked_at":"2026-02-20T23:52:33.807Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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:00:51.950Z","updated_at":"2026-02-21T01:32:00.553Z","avatar_url":"https://github.com/samsonjs.png","language":"JavaScript","readme":"strftime\n========\n\nstrftime for JavaScript. Works in (at least) node.js and browsers. Supports localization and timezones. Most standard specifiers from C are supported as well as some other extensions from Ruby.\n\n[![version 0.10.3 on npm](https://img.shields.io/badge/npm-0.10.3-brightgreen.svg?style=flat)](https://www.npmjs.com/package/strftime)\n[![node version 0.2 and up](https://img.shields.io/badge/node-\u003e=0.2-brightgreen.svg?style=flat)](https://nodejs.org)\n[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://sjs.mit-license.org)\n[![0 dependencies!](https://0dependencies.dev/0dependencies.svg)](https://0dependencies.dev)\n\nInstallation\n============\n\n[node](https://nodejs.org):\n\n    npm install strftime\n\n[bower](http://bower.io):\n\n    bower install strftime\n\n[component](https://github.com/componentjs/component):\n\n    component install samsonjs/strftime\n\n[yarn](https://yarnpkg.com):\n\n    yarn add strftime\n\nOr you can copy [strftime.js](https://github.com/samsonjs/strftime/blob/master/strftime.js) wherever you want to use it, whether that's with a \u0026lt;script\u0026gt; tag or `require` or anything else.\n\nChangelog\n=========\n\n[View the changelog](https://github.com/samsonjs/strftime/blob/master/Changelog.md).\n\nUsage\n=====\n\n```JavaScript\n    var strftime = require('strftime') // not required in browsers\n    console.log(strftime('%B %d, %Y %H:%M:%S')) // =\u003e April 28, 2011 18:21:08\n    console.log(strftime('%F %T', new Date(1307472705067))) // =\u003e 2011-06-07 18:51:45\n```\n\n\nIf you want to localize it:\n\n```JavaScript\n    var strftime = require('strftime') // not required in browsers\n    var it_IT = {\n        identifier: 'it-IT',\n        days: ['domenica', 'lunedi', 'martedi', 'mercoledi', 'giovedi', 'venerdi', 'sabato'],\n        shortDays: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'],\n        months: ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'],\n        shortMonths: ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'],\n        AM: 'AM',\n        PM: 'PM',\n        am: 'am',\n        pm: 'pm',\n        formats: {\n            D: '%m/%d/%y',\n            F: '%Y-%m-%d',\n            R: '%H:%M',\n            X: '%T',\n            c: '%a %b %d %X %Y',\n            r: '%I:%M:%S %p',\n            T: '%H:%M:%S',\n            v: '%e-%b-%Y',\n            x: '%D'\n        }\n    }\n    var strftimeIT = strftime.localize(it_IT)\n    console.log(strftimeIT('%B %d, %Y %H:%M:%S')) // =\u003e aprile 28, 2011 18:21:08\n    console.log(strftimeIT('%B %d, %Y %H:%M:%S', new Date(1307472705067))) // =\u003e giugno 7, 2011 18:51:45\n```\n\nSome locales are bundled and can be used like so:\n\n```JavaScript\n    var strftime = require('strftime') // not required in browsers\n    var strftimeIT = strftime.localizeByIdentifier('it_IT')\n    console.log(strftimeIT('%B %d, %Y %H:%M:%S')) // =\u003e aprile 28, 2011 18:21:08\n    console.log(strftimeIT('%B %d, %Y %H:%M:%S', new Date(1307472705067))) // =\u003e giugno 7, 2011 18:51:45\n```\n\n_The [full list of bundled locales](#locales) is below._\n\nTime zones can be passed in as an offset from GMT in minutes.\n\n```JavaScript\n    var strftime = require('strftime') // not required in browsers\n    var strftimePDT = strftime.timezone(-420)\n    var strftimeCEST = strftime.timezone(120)\n    console.log(strftimePDT('%B %d, %y %H:%M:%S', new Date(1307472705067))) // =\u003e June 07, 11 11:51:45\n    console.log(strftimeCEST('%F %T', new Date(1307472705067))) // =\u003e 2011-06-07 20:51:45\n```\n\nAlternatively you can use the timezone format used by ISO 8601, `+HHMM` or `-HHMM`.\n\n```JavaScript\n    var strftime = require('strftime') // not required in browsers\n    var strftimePDT = strftime.timezone('-0700')\n    var strftimeCEST = strftime.timezone('+0200')\n    console.log(strftimePDT('%F %T', new Date(1307472705067))) // =\u003e 2011-06-07 11:51:45\n    console.log(strftimeCEST('%F %T', new Date(1307472705067))) // =\u003e 2011-06-07 20:51:45\n```\n\nSupported Specifiers\n====================\n\nExtensions from Ruby are noted in the following list.\n\nUnsupported specifiers are rendered without the percent sign.\ne.g. `%q` becomes `q`. Use `%%` to get a literal `%` sign.\n\n- A: full weekday name\n- a: abbreviated weekday name\n- B: full month name\n- b: abbreviated month name\n- C: AD century (year / 100), padded to 2 digits\n- c: equivalent to `%a %b %d %X %Y %Z` in en_US (based on locale)\n- D: equivalent to `%m/%d/%y` in en_US (based on locale)\n- d: day of the month, padded to 2 digits (01-31)\n- e: day of the month, padded with a leading space for single digit values (1-31)\n- F: equivalent to `%Y-%m-%d` in en_US (based on locale)\n- H: the hour (24-hour clock), padded to 2 digits (00-23)\n- h: the same as %b (abbreviated month name)\n- I: the hour (12-hour clock), padded to 2 digits (01-12)\n- j: day of the year, padded to 3 digits (001-366)\n- k: the hour (24-hour clock), padded with a leading space for single digit values (0-23)\n- L: the milliseconds, padded to 3 digits [Ruby extension]\n- l: the hour (12-hour clock), padded with a leading space for single digit values (1-12)\n- M: the minute, padded to 2 digits (00-59)\n- m: the month, padded to 2 digits (01-12)\n- n: newline character\n- o: day of the month as an ordinal (without padding), e.g. 1st, 2nd, 3rd, 4th, ...\n- P: \"am\" or \"pm\" in lowercase (Ruby extension, based on locale)\n- p: \"AM\" or \"PM\" (based on locale)\n- R: equivalent to `%H:%M` in en_US (based on locale)\n- r: equivalent to `%I:%M:%S %p` in en_US (based on locale)\n- S: the second, padded to 2 digits (00-60)\n- s: the number of seconds since the Epoch, UTC\n- T: equivalent to `%H:%M:%S` in en_US (based on locale)\n- t: tab character\n- U: week number of the year, Sunday as the first day of the week, padded to 2 digits (00-53)\n- u: the weekday, Monday as the first day of the week (1-7)\n- v: equivalent to `%e-%b-%Y` in en_US (based on locale)\n- W: week number of the year, Monday as the first day of the week, padded to 2 digits (00-53)\n- w: the weekday, Sunday as the first day of the week (0-6)\n- X: equivalent to `%T` or `%r` in en_US (based on locale)\n- x: equivalent to `%D` in en_US (based on locale)\n- Y: the year with the century\n- y: the year without the century, padded to 2 digits (00-99)\n- Z: the time zone name, replaced with an empty string if it is not found\n- z: the time zone offset from UTC, with a leading plus sign for UTC and zones east\n     of UTC and a minus sign for those west of UTC, hours and minutes follow each\n     padded to 2 digits and with no delimiter between them\n\nFor more detail see `man 3 strftime` as the format specifiers should behave identically. If behaviour differs please [file a bug](https://github.com/samsonjs/strftime/issues/new).\n\nAny specifier can be modified with `-`, `_`, `0`, or `:` as well, as in Ruby. Using `%-` will omit any leading zeroes or spaces, `%_` will force spaces for padding instead of the default, and `%0` will force zeroes for padding. There's some redundancy here as `%-d` and `%e` have the same result, but it solves some awkwardness with formats like `%l`. Using `%:` for time zone offset, as in `%:z` will insert a colon as a delimiter.\n\n\u003ca name=\"locales\"\u003e\u003c/a\u003e\nBundled Locales\n===============\n\n  - de\\_DE\n  - en\\_CA\n  - en\\_US\n  - es\\_MX\n  - fr\\_FR\n  - it\\_IT\n  - nl\\_NL\n  - pt\\_BR\n  - ru\\_RU\n  - tr\\_TR\n  - zh\\_CN\n\nContributors\n============\n\n* [Alexandr Nikitin](https://github.com/alexandrnikitin)\n* [Andrew Pirondini](https://github.com/andrewjpiro) of [iFixit](https://github.com/iFixit)\n* [Andrew Schaaf](https://github.com/andrewschaaf)\n* [Aryan Arora](https://github.com/aryan-debug)\n* [Ayman Nedjmeddine](https://github.com/IOAyman)\n* [Cory Heslip](https://github.com/cheslip)\n* [Douglas de Espindola](https://github.com/douglasep)\n* [Forbes Lindesay](https://github.com/ForbesLindesay)\n* [John Zwinck](https://github.com/jzwinck)\n* [Joost Hietbrink](https://github.com/joost)\n* [Kevin Jin](https://github.com/Kevin-Jin)\n* [Maximilian Herold](https://github.com/mherold)\n* [Michael J.](https://github.com/michaeljayt)\n* [@mogando668](https://github.com/mogando668)\n* [Peter deHaan](https://github.com/pdehaan)\n* [Rob Colburn](https://github.com/robcolburn)\n* [Ryan Regalado](https://github.com/d48)\n* [Ryan Stafford](https://github.com/ryanstafford)\n* [Sami Samhuri](https://github.com/samsonjs)\n* [Stian Grytøyr](https://github.com/stiang)\n* [TJ Holowaychuk](https://github.com/tj)\n* [@w0den](https://github.com/w0den)\n* [Yusuke Kawasaki](https://github.com/kawanet)\n\nLicense\n=======\n\nCopyright 2010 - 2024 Sami Samhuri sami@samhuri.net\n\n[MIT license](https://sjs.mit-license.org)\n","funding_links":[],"categories":["Repository","JavaScript"],"sub_categories":["Date \u0026 Time"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsonjs%2Fstrftime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamsonjs%2Fstrftime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsonjs%2Fstrftime/lists"}