10.3.15 getDay (gets day from date)
Syntax
getDay [date]
Description
This command outputs the day of date specified for argument with 2-digit character (numeric characters) from 01 to 31. If the argument is omitted, the current date is assumed.
Arguments
- date
-
This command specifies the character string indicating date.
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
2-digit character string indicating day (numeric characters)
Return codes
Return code |
Meaning |
---|---|
0 |
Normal termination |
Not less than 1 |
Termination with an error |
Notes
Although the character string that can be specified for date is the same as that of the date format based on absolute date with the date command, whether the character string can be specified is not verified.
Examples
getDay 2016/05/02 # "02" is output.