login

days.gsf

Top / GrADS / script / days.gsf

Japanese / English

Name

days() - Get days of specified month or year.

Synopsis

ret = days( year [, month] )

Options and Return values

year
Year.
month
Month (optional).
ret
Number of days in month/year (if month is specified) or in year (if month is not specified).

Examples

(1) Show number of days in 1995.

  • test.gs
    rc = gsfallow( 'on' )
    say days( 1995 )
    
  • console
    ga-> test
    365
    

(2) Show number of days in November 2015.

  • test.gs
    rc = gsfallow( 'on' )
    say days( 2015, 11 )
    
  • console
    ga-> test
    30
    

Script source code