{"name":"strftime","version":"0.10.2","keywords":["strftime","format","string","time","date"],"author":{"name":"Sami Samhuri","email":"sami@samhuri.net"},"license":"MIT","_id":"strftime@0.10.2","maintainers":[{"name":"sjs","email":"sami@samhuri.net"}],"contributors":[{"url":"https://github.com/alexandrnikitin","name":"Alexandr Nikitin"},{"url":"https://github.com/andrewjpiro","name":"Andrew Pirondini of iFixit"},{"url":"https://github.com/andrewschaaf","name":"Andrew Schaaf","email":"andrew@andrewschaaf.com"},{"url":"https://github.com/IOAyman","name":"Ayman Nedjmeddine"},{"url":"https://github.com/cheslip","name":"Cory Heslip"},{"url":"https://github.com/douglasep","name":"Douglas de Espindola"},{"url":"https://github.com/ForbesLindesay","name":"Forbes Lindesay"},{"url":"https://github.com/jzwinck","name":"John Zwinck"},{"url":"https://github.com/joost","name":"Joost Hietbrink"},{"url":"https://github.com/Kevin-Jin","name":"Kevin Jin"},{"url":"https://github.com/michaeljayt","name":"Michael J."},{"url":"https://github.com/pdehaan","name":"Peter deHaan"},{"url":"https://github.com/robcolburn","name":"Rob Colburn","email":"rob@robcolburn.com"},{"url":"https://github.com/d48","name":"Ryan Regalado"},{"url":"https://github.com/ryanstafford","name":"Ryan Stafford"},{"url":"https://github.com/samsonjs","name":"Sami Samhuri","email":"sami@samhuri.net"},{"url":"https://github.com/stiang","name":"Stian Grytøyr"},{"url":"https://github.com/tj","name":"TJ Holowaychuk"},{"url":"https://github.com/w0den","name":"w0den"},{"url":"https://github.com/kawanet","name":"Yusuke Kawasaki"},{"url":"https://github.com/aryan-debug","name":"Aryan Arora"}],"homepage":"https://samhuri.net/projects/strftime","bugs":{"url":"https://github.com/samsonjs/strftime/issues","email":"sami@samhuri.net"},"dist":{"shasum":"9cc5a63a6170455730ddf617e8b506ab06dde985","tarball":"http://registry-npm.ywwl.com/strftime/download/strftime-0.10.2.tgz","fileCount":9,"integrity":"sha512-Y6IZaTVM80chcMe7j65Gl/0nmlNdtt+KWPle5YeCAjmsBfw+id2qdaJ5MDrxUq+OmHKab+jHe7mUjU/aNMSZZg==","signatures":[{"sig":"MEQCIFCrG1+V4xX1w1UWBcaX8B1g/OVyLRJqS/INoDG5bU8QAiAKS66+XTD4phdAr2aLwNAKg+sYbOGuCsXRHowCwXjVfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74288,"size":18294,"noattachment":false,"key":"/strftime/-/strftime-0.10.2.tgz"},"main":"./strftime.js","engines":{"node":">=0.2.0"},"gitHead":"a0a62db07656b398de813c24c3ab2ab38e83adf7","_npmUser":{"name":"sjs","email":"sami@samhuri.net"},"repository":{"url":"git://github.com/samsonjs/strftime.git","type":"git"},"_npmVersion":"9.6.4","description":"strftime for JavaScript","directories":{},"_nodeVersion":"20.1.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{},"optionalDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/strftime_0.10.2_1684987866262_0.20481277426910904","host":"s3://npm-registry-packages"},"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) [![node version 0.2 and up](https://img.shields.io/badge/node->=0.2-brightgreen.svg?style=flat)](https://nodejs.org) [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://sjs.mit-license.org)\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 &lt;script&gt; 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')) // => April 28, 2011 18:21:08\n    console.log(strftime('%F %T', new Date(1307472705067))) // => 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')) // => aprile 28, 2011 18:21:08\n    console.log(strftimeIT('%B %d, %Y %H:%M:%S', new Date(1307472705067))) // => 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')) // => aprile 28, 2011 18:21:08\n    console.log(strftimeIT('%B %d, %Y %H:%M:%S', new Date(1307472705067))) // => 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))) // => June 07, 11 11:51:45\n    console.log(strftimeCEST('%F %T', new Date(1307472705067))) // => 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))) // => 2011-06-07 11:51:45\n    console.log(strftimeCEST('%F %T', new Date(1307472705067))) // => 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<a name=\"locales\"></a>\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","publish_time":1684987866452,"_cnpm_publish_time":1684987866452,"dist-tags":{"latest":"0.10.3"}}