Owner's Manual (Complete)

Chapter 11 - Expressions
10 The Home Control Assistant
Pattern marker Meaning
$a Abbreviated weekday name
$A Full weekday name
$b Abbreviated month name
$B Full month name
$c Date and time appropriate for locale
$d Day of month as number (01-31)
$H Hour in 24-hour format (00-23)
$I Hour in 12-hour format (01-12)
$j Day of year as a number (001-366)
$m Month as a number (01-12)
$M Minutes as a number (00-59)
$p Current locale’s AM/PM indicator for 12-hour
clock
$S Second as a number (00-59)
$U Week of year as a number, with Sunday as the first
day of the week (00-51)
$w Weekday as a number (0-6). Sunday is 0.
$W Week of year as number with Monday as the first
day of the week (00-51)
$x Date representation appropriate for locale
$X Time representation appropriate for locale
$y Year without century as a number (00-99)
$Y Year with century as number
$z or $Z Time-zone name or abbreviation. Blank if not
known
$$ Dollar sign
There are four major uses of the time functions in the Compute element. These are:
Determine how long something took. This is done by:
t = _now()
... do something...
timeItTook = _now() - t
Add or subtract from the current time to generate a date-time in the past or future:
TwentyFourHoursAgo = _now() - _days(1)
SixAndAHalfHoursAgo = _now() - _timeSpan(0, 6, 30, 0)
Compose a date-time from its component parts:
t = _DateTime(2003, 3, 15, 9, 8, 3)