Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eAmin/jdate
JDate, is a JavaScript like Jalali date & time library for Browsers & NodeJS
https://github.com/eAmin/jdate
Last synced: 26 days ago
JSON representation
JDate, is a JavaScript like Jalali date & time library for Browsers & NodeJS
- Host: GitHub
- URL: https://github.com/eAmin/jdate
- Owner: eAmin
- Archived: true
- Created: 2012-04-03T17:32:22.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-07-10T12:29:27.000Z (over 12 years ago)
- Last Synced: 2024-11-14T10:43:48.978Z (29 days ago)
- Language: JavaScript
- Homepage:
- Size: 92.8 KB
- Stars: 19
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-persian - jdate - A JavaScript like Jalali date & time library for Browsers & NodeJS. (Jalali Date)
README
##JDate
JDate v0.0.2 beta
JDate, is a JavaScript like Jalali date & time library for Browsers & NodeJS
##Usage
##Browsers
var jdate = JDate();
console.log(jdate.getFullYear()); // 1391
console.log(jdate.getMonth()); // 01
console.log(jdate.getDate()); // 15
console.log(jdate.getDay()); // 4
console.log(jdate.getTime()); // 1336070315814
console.log(jdate.toString()); // 1391-01-15 22:08:50.398 +03:30
console.log(jdate.toString('yyyy/MMMM/dd HH:mm:ss')); // 1391/01/15 22:08:50##Node.JS
to install use npm and insert folowing command `npm install jdate` and use in your projectvar jdate = require('jdate').JDate();
console.log(jdate.getFullYear()); // 1391
console.log(jdate.getMonth()); // 01
console.log(jdate.getDate()); // 15
console.log(jdate.getDay()); // 4
console.log(jdate.getTime()); // 1336070315814
console.log(jdate.toString()); // 1391-01-15 22:08:50.398 +03:30
console.log(jdate.toString('yyyy/MMMM/dd HH:mm:ss')); // 1391/01/15 22:08:50
##Author
Amin Akbari
Copyright (c) 2012 Amin AKbari
http://eamin.me/
##TODO:
`JDate.parse()`
`JDate.setTimezone()`
`JDate.diff()`##License
Licensed under the MIT Style License