forked from slashmili/python-jalali
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
33 lines (29 loc) · 987 Bytes
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
jdatetime
=========
jdatetime is [Jalali](http://en.wikipedia.org/wiki/Iranian_calendar) implementation of Python's datetime module
INSTALL
-------
Install it with easy_install
```
easy_install jdatetime
```
OR install it from source
```
python setup.py install
```
Documents
---------
This module exactly follows Python Standard [datetime module's methods](http://docs.python.org/release/2.7.1/library/datetime.html)
Also these methods are addedd to jdatetime.date and jdatetime.datetime :
```
| fromgregorian(**kw)
| Convert gregorian to jalali and return jdatetime.date
| jdatetime.date.fromgregorian(day=X,month=X,year=X)
| jdatetime.date.fromgregorian(date=datetime.date)
| jdatetime.date.fromgregorian(datetime=datetime.datetime)
| togregorian(self)
| Convert current jalali date to gregorian and return datetime.date
| isleap(self)
| check if year is leap year
| algortim is based on http://en.wikipedia.org/wiki/Leap_year
```