メインコンテンツまでスキップ
バージョン:23.4

Date Operators

Ago, Hence, From Now Operators

Behavior: The ago and hence operators produce a date/time value that is the specified length of time in the past or future, respectively. Note that from now can be used as a synonym for hence.

Syntax:
timeInterval ago
timeInterval [hence | from now]

TimeInterval is typically given as a time interval value (see Time Intervals in Values). However, it can actually be any value or an expression in parentheses that yields a number, which will be treated as the number of seconds. The ago operator results in a time value that is the indicated length of time earlier than the present moment (in the past). The hence operator yields a time value that is the indicated length of time later than the present moment (in the future). The resulting value is set to use the Abbreviated International Time format when it is converted to text.

Example:

put three minutes hence into expirationTime

Example:

if modificationDate of file updateLog is earlier than 5 days ago then ...