Skip to content

arashm/JCal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jalali-Calendar

A Jalali calendar generator in JavaScript. This calendar uses the Jalaali-Js library for conversion between Gregorian to Jalali which is based on the algorithm provided by Kazimierz M. Borkowski and has a very good performance.

Usage

See the example.html. Jalali-Calendar is on early stages and might not be feature complete or usable on specific proposes. Suggest more features.

Date Formats

Jalali-Calendar will trigger a 'change' event when user choose a date. The event passes a jDate object which will give you the ability to format it's output:

calendar.on('change', function(date){
  console.log(date.format('dddd DD MMMM YYYY')) //=> دوشنبه 6 امرداد 1393
});

The conversion identifiers are as follows:

Identifier Description Example
YYY or YYYY Full Year (4 digits) 1393
YY Year (2 digits) 93
M or MM Month in number returns 5 for امرداد
MMM or MMMM Month in string امرداد
D or DD Day in number 26
d or dd Abbreviation of day name in string ۱ش (for یکشنبه)
ddd or dddd Full day name in string یکشنبه

Contribute

Report bugs and suggest feature in issue tracker. Feel free to Fork and send Pull Requests.

ToDo

  • Add CSS styles for bigger calenders
  • Add support for Persian numbers

License

MIT

About

A Jalali calendar generator in JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published