dayofyear.gsf
名前
dayofyear() - 1月1日を1として年始からの日数を求める、もしくは年始からの日数から月日を求める
概要 (1)
ret = dayofyear( time )
引数と戻り値(1)
- time
- GrADS 形式の時刻。例えば "15feb2001" 等。
- ret
- 1月1日を1としたときの年始からの日数(time)。
概要 (2)
ret = dayofyear( day-of-year )
引数と戻り値(2)
- day-of-year
- 1月1日を1としたときの年始からの日数。
- ret
- 月日。
使用例
(1) 2004年3月15日が1年の何日目か調べる
-
test.gs
rc = gsfallow( 'on' ) say dayofyear( '15mar2004' )
-
コンソール
ga-> test 75
(1) 360日目が何月何日か調べる
-
test.gs
rc = gsfallow( 'on' ) say dayofyear( 360 )
-
コンソール
ga-> test 26Dec
ソースコード
- dayofyear.gsf (必須)
- chcase.gsf (必須)
- cmonth.gsf (必須)
- days.gsf (必須)
- printf.gsf (必須)