andrewplummer / Sugar

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

Same date returns for last or first weekday of a given month #652

Open CodeSnooker opened 5 years ago

CodeSnooker commented 5 years ago

For example,

Use Date.create('first Thursday of next month') or Date.create('last Thursday of next month')

Both of them returns same date. As of now it returns 'Thu Jul 04 2019 23:59:59 GMT+0530 (India Standard Time)'

Expected result last Thursday of next month should returns 'Thu Jul 25 2019 23:59:59 GMT +0530 (India Standard Time)'

andrewplummer commented 5 years ago

Thanks for letting me know about this! I'll have a look.