andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.53k stars 306 forks source link

Date.get {past: true} does work for weekdays, yet not for Months #620

Open thomasf1 opened 6 years ago

thomasf1 commented 6 years ago
d1 = Date.create('01.01.1833')
d1.get('Sunday')
#>>> Sun Dec 30 1832 00:00:00 GMT+0100 (CET)
d1.get('December')
#>>>Sun Dec 01 1833 00:00:00 GMT+0100 (CET)
d1.get('December', {past: true})
#>>>Sun Dec 01 1833 00:00:00 GMT+0100 (CET)

I would have expected to give the December of 1832 on the two last examples.

andrewplummer commented 6 years ago

Wow, this one has taken ages for me to respond to. Put in a fix... thank you!