perform calendar arithmetic on individual date fields
AdjustDateField( d, field, amount )
Date; a Date object
string; the date field on which to operate
numeric; the amount by which to adjust the indicated field of the date
The AdjustDateField( d ) command operates on individual fields of the Date object d, adjusting (incrementing or decrementing) the indicated field field by the value amount.
There are two methods by which the indicated date field may be adjusted, "add" or "roll".
The "add" method causes an "overflow" of the indicated field to affect successively larger fields of the date. For example, adding 50 days to the day of the month using the "add" method changes the month field, and possibly the year.
The "roll" method applies the indicated adjustment to the indicated date field without affecting other fields of the date. Instead, the amount value is reduced modulo the valid values of field in the case that these are finite in number. For instance, adding 20 to the day of the week is equivalent to adding 6 to the day of the week, because 20 and 6 are equivalent modulo 7.
The field names that can be adjusted by AdjustDateField are as follows.
the meridian (0=am, 1=pm)
the day of the month
the day of the month (synonym for "date")
the day of the week (1..7)
the numerical day of the entire year
the era (0=BCE or 1=CE)
the hour of the day
the hour of the day (24-hour clock)
the hour of the day (12-hour clock)
the meridian (0=am, 1=pm) (synonym for "ampm")
the millisecond within the second
the minute of the hour
the month of the year (1=January, .., 12=December)
the second of the minute
the week within the month (1..5)
the week within the year (1..53)
d ≔ Date⁡1995,9,23,4,2
d≔<Date: 1995-09-23T04:02:00 GMT>
<Date: 1995-09-20T04:02:00 GMT>
<Date: 1995-11-17T16:02:00 GMT>
The Calendar[AdjustDateField] command was introduced in Maple 2018.
For more information on Maple 2018 changes, see Updates in Maple 2018.
Download Help Document
What kind of issue would you like to report? (Optional)