Date
A Date value represents a specific date. It contains the year, month and day, any of which can be accessed separately if needed. Its methods also allow creation of new Date values derived from the base value, such as using ${today.plusDays(30)}
to create a Date that is 30 days in the future of the Date called "today".
Related commands
setDate
Allows new Date values to be created within the logic, such as very easy creation of the date on which the logic is being run.setDateFormat
Used for creating Date formats that allow wide customization of how Date values are converted into Strings to be displayed on document.setDateParser
A Date parser created by this command can be used to convert Strings into Dates.
Methods
getDayOfYear() / getDayOfMonth() / getDayOfWeek() | These three methods resolve into a Number telling the day of this Date in different contexts. For example, the expression Using the shorthand form, the expression becomes |
getYear() / getMonthOfYear() | These two methods resolve into a Number representing the year / month of the Date. For example, the expression Using the shorthand form, the expression becomes |
minusYears(value) / minusMonths(value) / minusWeeks(value) / minusDays(value) | A set of methods that resolve into a new Date that is this Date but with the specified number of years/months/weeks/days earlier in time. For example, the expression |
plusYears(value) / plusMonths(value) / plusWeeks(value) / plusDays(value) | A set of methods that resolve into a new Date that is this Date but with the specified number of years/months/weeks/days later in time. For example, the expression |
withYear(value) / withMonth(value) / withDay(value) | A set of methods that resolve into a new Date that is this Date, but with the year/month/day set to the specified number. For example, the expression |