Date accessors and manipulator operators are available for rules and actions:
- Date.day
- Date.hour
- Date.minute
- Date.month
- Date.second
- Date.week
- Date.weekday
- Date.year
- date(dateStr)
- date(yearNum, monthNum, dayNum[, hourNum, minNum])
- day(aDate[, dayNum])
- days(firstDate, lastDate)
- hour(aDate[, hoursNum])
- hours(startDate, endDate)
- Interval.day
- Interval.hour
- Interval.minute
- Interval.second
- interval(dataStr)
- interval(startDate, endDate)
- locale(localeCodeStr)
- minute(aDate[, minutesNum])
- minutes(startDate, endDate)
- month(aDate[, monthsNum])
- months(startDate, endDate)
- seconds(startDate, endDate)
- time(aDate, hoursNum, minutesNum, secondsNum)
- time(aDate)
- weeks(startDate, endDate)
- year(aDate[, yearsNum])
- years(startDate, endDate)
The action code method to format a date string is to call the various date-related operators.
Date examples:
date(2004,7,23,16,45)
…is 23 July 2004 16:45
If $Date is July 4, 2009 then
day($Date)
…is 4
If $Date is July 4,2009, then
$Date=day($Date,5)
will change $Date to July 5, 2009.
If $Date is July 4, 2009 then
month($Date)
…is 7
If $Date is July 4,2009, then
$Date=month($Date,5)
will change $Date to May 4, 2009.