moment / luxon

⏱ A library for working with dates and times in JS
https://moment.github.io/luxon
MIT License
15.33k stars 730 forks source link

Add next/previous weekday enhancement #1523

Closed shashankbhat10 closed 11 months ago

shashankbhat10 commented 1 year ago

I have a couple of questions regarding this.

  1. What should be the expected behaviour when weekday argument is incorrect(eg: weekday is a string or the weeday value is out of valid range). Should the method be throwing an InvalidArgumentException?

  2. Currently, the method will return the DateTime with the next/previous weekday. So, if the current weekday is Monday(1) and the methods are called with argument as 1, the method does not return the current date but the previous or next Monday. Is this the correct behaviour?

resolves #1517

linux-foundation-easycla[bot] commented 1 year ago

CLA Not Signed

thomassth commented 11 months ago

@shashankbhat10 you'll need to authorize on the CLA for this PR

shashankbhat10 commented 11 months ago

@thomassth @diesieben07 I think I messed up while creating the PR as the commit is from a different account. Is it fine if I create a duplicate PR with commit from this ID (I have signed the CLA on this account).

shashankbhat10 commented 11 months ago

Closing PR (due to CLA conflict). Handled issue in #1538