Replies: 1 comment
-
I am not 100% sure I understand your question. If you're using week units (
Please clarify what you mean by "work". This code works just fine today. I think this issue might come from the misunderstanding that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Creating a date from a week number like this:
DateTime.fromObject({ weekYear: 2025, weekNumber: 1 })
resolves to2024-12-30
. This is because the first day of the week falls in the previous year. However, the week belongs to the input date because its Thursday is included in that date.Wouldn't it make more sense to resolve to a Thursday, then? Doing things like
DateTime.fromObject({ weekYear: 2025, weekNumber: 1 }).month
would suddenly work.Beta Was this translation helpful? Give feedback.
All reactions