Dates can be entered in one of a number of absolute formats, or alternatively, they can be entered as a delta time. Where appropriate date fields may also include a time component.
The basic date syntax is: date[, time]
Internally dates are stored in UTC format which is similar to GMT and converted back to local time and language using the RISC OS territory manager. One 'feature' of using UTC is the effect of daylight saving time. RISC OS always converts back to local time using the rules in force at the time of conversion and so times can appear to shift by the extent of the DST offset. Refer to the section on date formatting for further discussion and how to compensate for the change.
An absolute time marks an instant in time. '1 Jan 2004, 22:30' is an absolute time. All date components, apart from days, are optional and default to current date. Time components are also optional, however, it should be noted that omitted time components default to 00:00.
Valid absolute time syntax is: dd[-mm[-yyyy]][, hh[:mm]]
Month may be specified either numerically or alphabetically. When specified by name you use your local language (as defined by your RISC OS territory) and can use either the short or full format.
If you elect to omit the century component of the year then the century will default to 20 for years in the range 00-49. Similarly years in the range 50-99 default the century to 19.
Example Absolute Times | |
1 | 01 Jan 2004, 00:00 (assumes input was in Jan 2004) |
4 Feb, 15 | 4 Feb 2004, 15:00 (assumes input was in 2004) |
21/3/5,15:35 | 21 Mar 2005, 15:35 |
31-12-1999, :30 | 31 Dec 1999, 00:30 |
A delta time is the difference between two absolute times. '+4' and '-365' are delta times. Currently only days are recognized as delta and any time component included is assumed to be the absolute time on the resulting date. For example, '+1, 10' is ten o'clock tomorrow and not 1 day and 10 hours from now.
Valid delta time syntax is: {+ | -}days[, hh[:mm]]
Example Delta Times | |
+0 | Today @ 00:00 |
-1, 14 | Yesterday @ 14:00 |
+31, 22:40 | 31 days from now @ 22:40 |