File: README.rst

package info (click to toggle)
python-pyluach 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 224 kB
  • sloc: python: 1,199; makefile: 20
file content (58 lines) | stat: -rw-r--r-- 1,392 bytes parent folder | download
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
pyluach
========

Pyluach is a Python package for manipulating Hebrew (Jewish) calendar dates and 
Hebrew-Gregorian conversions.

Features
---------
* Conversion between Hebrew and Gregorian dates
* Finding the difference between two dates
* Finding a date at a given duration from the given date
* Rich comparisons between dates
* Finding the weekday of a given date
* Finding the weekly Parsha reading of a given date

Installation
-------------
Use ``pip install pyluach``.

Typical use
------------
::

    >>> from pyluach import dates, hebrewcal, parshios
    
    >>> today = dates.HebrewDate.today()
    >>> lastweek_gregorian = (today - 7).to_greg()
    >>> lastweek_gregorian < today
	True
    >>> today - lastweek_gregorian
    7
    >>> greg = GregorianDate(1986, 3, 21)
    >>> heb = HebrewDate(5746, 13, 10)
    >>> greg == heb
    True
    
    >>> for month in hebrewcal.Year(5774).itermonths():
    ...     print(month.name)
    Tishrei Cheshvan ...

    >>> date = dates.GregorianDate(2010, 10, 6)
    >>> print(parshios.getparsha(date))
    [0]
    >>> print(parshios.getparsha_string(date))
    Beraishis

Documentation
-------------
Documentation for pyluach can be found at https://readthedocs.org/projects/pyluach/.

Contact
--------
For questions and comments feel free to contact me at simlist@gmail.com.

License
--------
Pyluach is licensed under the MIT license.