hebcal / hebcal-js

⛔️ DEPRECATED - a perpetual Jewish Calendar (JavaScript)
GNU General Public License v3.0
124 stars 40 forks source link

Get next/previous month #69

Closed tamarklg closed 5 years ago

tamarklg commented 5 years ago

I'm using your library and it's very helpful...

I came across a little bug: When I try to add/subtract 1 month to/from a date that is the last day of full month (30 days), the result is - the first day of next 2 months. e.g. ל סיון + חודש 1 = א אב

Scimonster commented 5 years ago

What is your expected behavior? It tries to add a month to be ל תמוז, which doesn't exist, so it rolls over to א אב.

tamarklg commented 5 years ago

I expect it to behave like moment.js. When you try to add 1 month to: 31/10/2019, the result is: 30/11/2019.

Scimonster commented 5 years ago

So this behavior is by design in this library and changing it would be a breaking change

On Wed, Sep 18, 2019, 7:26 AM TamarKlagsbald notifications@github.com wrote:

I expect it to behave like moment.js. When you try to add 1 month to: 31/10/2019, the result is: 30/11/2019.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hebcal/hebcal-js/issues/69?email_source=notifications&email_token=AAVSCEXDN2UYZPXURM7YCMDQKGUWFA5CNFSM4ILH53W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD66YAFQ#issuecomment-532512790, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVSCESK7TYRQLO3ZGDR253QKGUWFANCNFSM4ILH53WQ .

tamarklg commented 5 years ago

Thanks