simlist / pyluach Goto Github PK
View Code? Open in Web Editor NEWA Python package for manipulating Hebrew (Jewish) calendar dates and Hebrew-Gregorian conversion.
Home Page: https://github.com/simlist/pyluach
License: Other
A Python package for manipulating Hebrew (Jewish) calendar dates and Hebrew-Gregorian conversion.
Home Page: https://github.com/simlist/pyluach
License: Other
I would like to have holiday support in this project.
The basic support is that if holiday=True, getparash will return the closest parasha or holiday, plus to add the hol-hamo'ed parashos to all parashos.
I don't mind contribute it myself, but first I would like to discuss the design with you.
I want to automatically congrats on holiday, but the blessing is different between fast and actual holiday.
We can do it without inflecting the current holiday
API that still will return fast alongside holiday.
Good morning,
I noticed an issue with the new update:
Steps to Reproduce:
from pyluach import dates, parshios, hebrewcal
)today = dates.HebrewDate.today()
)parshios.getparsha_string(today)
Expected Behavior:
Returns a string of the parsha
Actual Behavior:
Throws the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/menachem/.local/lib/python3.5/site-packages/pyluach/parshios.py", line 137, in getparsha_string
if parsha is None:
UnboundLocalError: local variable 'parsha' referenced before assignment
Proposed Solution:
Move line 139 above line 137 so that parsha
is assigned before the check.
Notes
Already fixed in dev
branch
Line location:
Line 137 in 00f415f
Thank you so much for such a wonderful package.
if I only have the month and day (Yahrzeit of Yusef Hasadik, which is today :) ), how would I calculate when it will be next year ?
I was thinking to
1: Assume it was this year,
Loop
2: if the date does not work try a year before
end of loop
so the birthdays will be correct, but yr is off.
Following the instructions on https://pypi.org/project/pyluach/, but am unable to install the library using pip or pip3. Was it delisted from pypi?
pip3 install pylauch
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pylauch (from versions: none)
ERROR: No matching distribution found for pylauch
pip install pylauch
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pylauch (from versions: none)
ERROR: No matching distribution found for pylauch
pip --version
pip 23.2.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
pip3 --version
pip 23.2.1 from /usr/local/lib/python3.10/dist-packages/pip (python 3.10)
MWE:
from pyluach import dates
dates.HebrewDate(5782, 1, 1) - 1
dates.HebrewDate(5782, 13, 29) + 1
returns:
HebrewDate(5782, 13, 29)
HebrewDate(5782, 1, 1)
today
HebrewDate(5782, 5, 27)
(today+10)
HebrewDate(5782, 6, 7)
(today+10).month_name()
'Elul'
(today+10).holiday()
'Shavuos'
It seems there is no support for Four Parshiot (Shekalim, Zachor, Para, Hodesh) in pyluach. Is that correct?
It would be nice to be able to get titles in other languages
I can add translations of titles into Russian
Hello,
I was just wondering if there are any plans to publish an "official" (non-dev) release of this package? One of our dependencies started pulling in pyluach
as a sub-dependency in a new release, and with our package management tool (pipenv
) we either need to specify --pre
to get it to work (which can then pull in other pre-release packages which we don't want, or pin our dependency to an older version.
Thanks!
Hi.
First, I'd like to say thanks for this great package.
It'd be nice to be able to get the specific day of the holiday. For example "ב סוכות" instead of "סוכות" for all Sukkot days.
When requested (with a flag or by another class), we set the Hebrew date to set Tishrey as the 1st month, and Elul as the last one.
I'm willing to start working on this feature, but first I wanted to check if it's something that you also think is useful and worth working on. I also wanted to consult with you what you think is the best approach for this feature (flag or another class).
Let me know what you think
For Birthday or Yahrtzeit, How can I calculate the next year?
Let's assume the date is 5- Adar 2, when will it be next year?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.