dayofyear.gsf
- Name
- Synopsis (1)
- Options and Return values
- Synopsis (2)
- Options and Return values
- Examples
- Script source code
Name
dayofyear() - Get day-of-year from time. Or, get date from day-of-year, assuming no leap year.
Synopsis (1)
ret = dayofyear( time )
Options and Return values
- time
- GrADS-style time, For example, "15feb2001".
- ret
- Day of year, assuming January 1st is 1.
Synopsis (2)
ret = dayofyear( day-of-year )
Options and Return values
- day-of-year
- Day of year, assuming January 1st is 1.
- ret
- Date.
Examples
(1) Show day of year of 15 March 2004.
-
test.gs
rc = gsfallow( 'on' ) say dayofyear( '15mar2004' )
-
console
ga-> test 75
(1) Show date of day-of-year=360.
-
test.gs
rc = gsfallow( 'on' ) say dayofyear( 360 )
-
console
ga-> test 26Dec
Script source code
- dayofyear.gsf (necessary)
- chcase.gsf (necessary)
- cmonth.gsf (necessary)
- days.gsf (necessary)
- printf.gsf (necessary)