zman-org / zman

:calendar: A Jewish date converter and helper.
https://github.com/zman-org/zmanim.github.io/blob/dev/src/docs/index.md
MIT License
17 stars 6 forks source link

->parshaHebrew Show the wrong parsha next year! #33

Open StaffCollab opened 11 months ago

StaffCollab commented 11 months ago

It shows next year ויקהל -פקודי together, but it will be separate.

pintend commented 2 months ago

Can you show code, it looks like its working

\Zman\Zman::parse('3/9/2024')->parsha === 'Vayakheil'

StaffCollab commented 2 months ago

@shrage-oberlander Please clarify.

Please check 2025, I spoke about next year

pintend commented 2 months ago

oh, i see. you are correct, it is wrong. I thought 2024 because you posted in 2023...

also https://github.com/zman-org/zman/issues/35

zachweix commented 2 months ago

I have worked on this project in the past, but you can check my more recent work at https://github.com/zachweix/PhpZmanim. I admit that I need to update the documentation, but if you are using a new enough version of the library you can get a date (make sure it's Shabbos, during the week it will return nothing) and get the parsha.

pintend commented 2 months ago

https://github.com/zman-org/zman/blob/ec4a4f5f4454ecbf394120b90c771a5cf3dc0b92/src/Getters/Parsha.php#L89 https://github.com/zman-org/zman/blob/ec4a4f5f4454ecbf394120b90c771a5cf3dc0b92/src/Getters/Parsha.php#L90

$shabbos === 21 so $this->assertEquals('Vayakheil', Zman::parse('03/22/2025')->parsha) fails

pintend commented 2 months ago

Pull request https://github.com/zman-org/zman/pull/36

yskraus commented 2 months ago

what about next weeks parsha? is it also included in this commit?

pintend commented 2 months ago

No, its caused by a different bug on line 135 as you mentioned.

the issue i have with fixing it, is there are no tests that fail when we comment out the code and removing it "fixes" it for this year

Shrage-Oberlander commented 15 hours ago

@pintend do you have a fixed version of the Vayakeil Pekidai issue for this year?