Hitachi

JP1 Version 11 JP1/Advanced Shell Description, User's Guide, Reference, and Operator's Guide 


10.3.12 getCalcDate (gets the calculated date)

Syntax

getCalcDate  date  [+|-]number-of-years  [+|-]number-of-months  [+|-]number-of-days

Description

This command outputs the date calculated by calculating number-of-years, number-of-months, number-of-days specified for argument to date specified for argument in the format yyyy/mm/dd.

Arguments

date

This command specifies the character string indicating date.

number-of-years

Specify a value not less than 0 that indicates number of years.

number-of-months

Specify a value not less than 0 that indicates number of months.

number-of-days

Specify a value not less than 0 indicating number of days.

Syntax of date can be specified with absolute date in the date command to date (Example: yyyy/mm/dd, yyyy-mm-dd, yyyymmdd, mm/dd/yyyy).

Output to the standard output

Character string that indicates the calculated date.

Return codes

Return code

Meaning

0

Normal termination

Not less than 1

Termination with an error

Notes

Examples

getCalcDate 2016/05/02 +1 -4 18     # "2017/01/20" is output.
getCalcDate 2016/05/02 0 -6 0       # "2015/11/02" is output.