You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> now = Temporal.Now.zonedDateTimeISO()
> now.toString()
"2025-03-31T14:19:39.108140159+01:00[Europe/London]"
> now.add('P1M').toString()
"2025-04-30T14:19:39.108140159+01:00[Europe/London]"
Month durations / interval modifications should be able to account for calendar days per ISO 8601 and consistently change the month only without carrying excess days over and returning a date in the following month.
In the ISO8601 spec:
month
duration of 28, 29, 30 or 31 calendar days depending on the start and/or the end of the corresponding time
interval within the specific calendar month
NOTE 1 The term “month” applies also to the duration of any time interval which starts at a certain time of day at a
certain calendar day of the calendar month and ends at the same time of day at the same calendar day of the next
calendar month, if it exists. In other cases the ending calendar day has to be agreed on.
NOTE 2 In certain applications a month is considered as a duration of 30 calendar days.
PHP Version
8.4.5
Operating System
No response
The text was updated successfully, but these errors were encountered:
Description
The following code:
Resulted in this output:
But I expected this output instead:
For comparison in JS Temporal:
Month durations / interval modifications should be able to account for calendar days per ISO 8601 and consistently change the month only without carrying excess days over and returning a date in the following month.
In the ISO8601 spec:
PHP Version
8.4.5
Operating System
No response
The text was updated successfully, but these errors were encountered: