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
If we construct a date at midday, Tuesday with new Chronos('Tue 12:0'), but we are currently at 4pm tuesday, then this date will be 4 hours in the past. Let's suppose we always want the constructed date to be in the future. We could "fix" this by specifying new Chronos('next Tue 12:0'), which will point to 7 days ahead. However, if we are currently at 9am on a Tuesday, this will still point 7 days ahead, instead of to midday on the current day, because the next specifier only considers the date portion of the date/time compound and completely ignores the time. Therefore it is impossible to construct a relative date & time that always points to the next future occurrence of that specific date and time.
The text was updated successfully, but these errors were encountered:
Bilge
changed the title
Cannot construct a relative date that always point to a future date & time
Cannot construct a relative date that always point to the _next_ future date & time
Aug 15, 2023
Bilge
changed the title
Cannot construct a relative date that always point to the _next_ future date & time
Cannot construct a relative date that always points to the _next_ future date & time
Aug 15, 2023
If we construct a date at midday, Tuesday with
new Chronos('Tue 12:0')
, but we are currently at 4pm tuesday, then this date will be 4 hours in the past. Let's suppose we always want the constructed date to be in the future. We could "fix" this by specifyingnew Chronos('next Tue 12:0')
, which will point to 7 days ahead. However, if we are currently at 9am on a Tuesday, this will still point 7 days ahead, instead of to midday on the current day, because thenext
specifier only considers the date portion of the date/time compound and completely ignores the time. Therefore it is impossible to construct a relative date & time that always points to the next future occurrence of that specific date and time.The text was updated successfully, but these errors were encountered: