Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.weeks() gives 0 for months with daylight saving time time change #6096

Open
mlodzianck opened this issue Jan 26, 2023 · 2 comments
Open

.weeks() gives 0 for months with daylight saving time time change #6096

mlodzianck opened this issue Jan 26, 2023 · 2 comments

Comments

@mlodzianck
Copy link

Describe the bug
For PL locale, for month Nov, duration made with month start and end weeks() method always returns 0

Expected behavior
weeks() should return 4 or 3

Desktop (please complete the following information):

  • Windows
  • Browser: Edge
  • Version 2.29.4

Moment-specific environment

  • Warsaw
  • 26/01/2023 3pm

Please run the following code in your environment and include the output:

s=moment('2023-10-01')
e = moment('2023-10-01').endOf("month");
dur = moment.duration(e.diff(s))
dur.weeks()
@daniellecrasiuc
Copy link

Hi can I be assigned to this Issue?

@daniellecrasiuc
Copy link

Hi, I have been trying to replicate this issue but am getting the expected behavior, is the issue still persisting when you run it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants