8.4.3 Year (return the year for a specified date)
- Purpose
-
Returns a four-digit numeric representing the year for a specified date.
- Syntax
Year ([Date])
- Argument
-
- Date
-
Write the date in yyyy/mm/dd format. Numbers specified in the range 0 to 69 in yyyy are read as 2000 to 2069.
If an invalid value is specified for mm, an error occurs. However, if an invalid value is specified for dd, no error occurs. Instead, the Year command replaces the specified date with the equivalent valid date and returns the result. For example, if 1999/12/32 (a nonexistent date) were specified, the Year command would replace the specified date with the valid date 2000/01/01 and would return 2000.
This value is optional. If you omit this value, the current date is assumed.
- Description
-
The Year command returns a four-digit numeric representing the year of the specified date.
- JP1/Script version
-
Supported from JP1/Script 01-00.