https://github.com/b-coimbra/strftime.js
lightweight ruby-like strftime date formatting implementation
https://github.com/b-coimbra/strftime.js
date-formatting datetime strftime
Last synced: about 2 months ago
JSON representation
lightweight ruby-like strftime date formatting implementation
- Host: GitHub
- URL: https://github.com/b-coimbra/strftime.js
- Owner: b-coimbra
- Created: 2018-01-19T01:07:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-06T00:57:06.000Z (over 5 years ago)
- Last Synced: 2025-01-28T17:22:13.265Z (4 months ago)
- Topics: date-formatting, datetime, strftime
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# strftime.js
Ruby-like strftime method implementation in Javascript without the percentage notation.
The formatting is based on [strftime.org](http://strftime.org)
## Example
```js
console.log(new Date().strftime('H:M p - A')) // 21:32 AM - Thursday
``````js
console.log(new Date('01/01/2018').strftime('m/b/Y')) // 1/Jan/2018
``````js
console.log(new Date('01/18/2018').strtime('do B Y')) // 18th January 2018
```