100 integer,
intent(in):: year
101 integer,
intent(in):: month
102 integer,
intent(in):: day
103 integer,
intent(in):: hour
104 integer,
intent(in):: min
105 real(DP),
intent(in):: sec
106 type(
dc_cal_date),
intent(out),
optional,
target:: date
107 character(*),
intent(in),
optional:: zone
108 logical,
intent(out),
optional:: err
114 integer:: start, length
116 character(STRING):: cause_c
117 character(*),
parameter:: version = &
119 &
'$Id: dccaldatecreate.f90,v 1.3 2010-09-24 07:07:31 morikawa Exp $'
120 character(*),
parameter:: subname =
'DCCalDateCreate1'
129 if (
present( date ) )
then
154 if ( month < 1 )
then
156 call messagenotify(
'W', subname,
'month=<%d> must be natural number', &
163 call messagenotify(
'W', subname,
'day=<%d> must be natural number', &
170 call messagenotify(
'W', subname,
'hour=<%d> must not be negative', &
177 call messagenotify(
'W', subname,
'min=<%d> must not be negative', &
182 if ( sec < 0.0_dp )
then
184 call messagenotify(
'W', subname,
'sec=<%f> must not be negative', &
189 call match(
'^[#+-]#d+:#d+$', zone, &
191 if ( length > 0 )
then
201 datep % month = month
210 datep % initialized = .true.
213 call storeerror( stat, subname, err, cause_c )
297 character(*),
intent(in):: date_str
298 type(
dc_cal_date),
intent(out),
optional,
target:: date
299 logical,
intent(out),
optional:: err
311 character(TOKEN):: zone
313 character(STRING):: cause_c
314 character(*),
parameter:: version = &
316 &
'$Id: dccaldatecreate.f90,v 1.3 2010-09-24 07:07:31 morikawa Exp $'
317 character(*),
parameter:: subname =
'DCCalDateCreate2'
326 if (
present( date ) )
then
345 & year, month, day, hour, min, sec, zone, &
347 if (
present(err) )
then
358 & year, month, day, hour, min, sec, &
359 & datep, zone, err = err )
360 if (
present(err) )
then
372 call storeerror( stat, subname, err, cause_c )
subroutine dccaldatecreate2(date_str, date, err)
subroutine dccaldatecreate1(year, month, day, hour, min, sec, date, zone, err)
日時の設定手続
dc_calendar 手続のインターフェース宣言
type(dc_cal_date), target, save, public default_date
デフォルトの日時. DCCalDate で始まる手続のうち, DC_CAL_DATE 型の省略可能引数が 与えられない場合にはこの日時が設定もしくは利用される.
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
エラー等を保持
integer, parameter, public dc_ebaddate
シンプルな正規表現関数 'match' を提供します.
subroutine, public match(pattern, text, start, length)
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
integer, parameter, public dp
倍精度実数型変数