https://github.com/ctrlcctrlv/phpdate.js
Use PHP date() formats in JavaScript
https://github.com/ctrlcctrlv/phpdate.js
Last synced: over 1 year ago
JSON representation
Use PHP date() formats in JavaScript
- Host: GitHub
- URL: https://github.com/ctrlcctrlv/phpdate.js
- Owner: ctrlcctrlv
- Created: 2014-02-23T15:56:56.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-24T13:26:20.000Z (over 12 years ago)
- Last Synced: 2025-02-18T06:13:46.436Z (over 1 year ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This small library allows you to use PHP date() format strings in JavaScript cleanly.
My use case was so that the user configured date format in Tinyboard would be shared by JavaScript components of the same.
Usage example (assuming JavaScript-C as the interpreter):
d = new Date(2014, 0, 21, 2, 3, 4);
print(date(d,'M/d/Y h:i:s (U)'))
print(date(d,'r'));