Go to the source code of this file.
Functions/Subroutines | |
| subroutine | dccaldatecreate1 (year, month, day, hour, min, sec, date, zone, err) |
| Date setting procedures. | |
| subroutine | dccaldatecreate2 (date_str, date, err) |
| subroutine dccaldatecreate1 | ( | integer, intent(in) | year, |
| integer, intent(in) | month, | ||
| integer, intent(in) | day, | ||
| integer, intent(in) | hour, | ||
| integer, intent(in) | min, | ||
| real(dp), intent(in) | sec, | ||
| type(dc_cal_date), intent(out), optional, target | date, | ||
| character(*), intent(in), optional | zone, | ||
| logical, intent(out), optional | err ) |
Date setting procedures.
Procedures described in this file are provided from "dc_calendar" module.
Set date with individual variables
Set date.
If a string like as "YYYY-MM-DDThh:mm:ss.sTZD" (YYYY is year, MM is month, DD is day, hh is hour, mm is minute, ss.s is second, TZD is time zone) is used, use a following homonymous subroutine.
If an optional argument date is omitted, the date setting is stored to a "dc_calendar_types#DC_CAL_DATE" variable that is saved in the "dc_calendar". When date is omitted in subsequent procedures, the internal date is used. If date is not omitted, the settings is stored to the date. In order to use the date setting, use the "dc_calendar_types#DC_CAL_DATE" variable to subsequent procedures.
| [in] | year | Year |
| [in] | month | Month |
| [in] | day | Day |
| [in] | hour | Hour |
| [in] | min | Minute |
| [in] | sec | Second |
| [out] | date | An object that stores information of date and time. If this is omitted, these information is set as default date and time. |
| [in] | zone | Time-zone (difference from UTC) |
| [out] | err | Exception handling flag. By default, when error occur in this procedure, the program aborts. If this err argument is given, .true. is substituted to err and the program does not abort. |
Definition at line 89 of file dccaldatecreate.f90.
References dc_trace::beginsub(), dc_error::dc_ebaddate, dc_error::dc_noerr, dc_calendar_internal::default_date, dc_types::dp, dc_trace::endsub(), dc_regex::match(), dc_error::storeerror(), and dc_types::string.
| subroutine dccaldatecreate2 | ( | character(*), intent(in) | date_str, |
| type(dc_cal_date), intent(out), optional, target | date, | ||
| logical, intent(out), optional | err ) |
Set date with date string
Set date.
Specify a string like as "YYYY-MM-DDThh:mm:ss.sTZD" (YYYY is year, MM is month, DD is day, hh is hour, mm is minute, ss.s is second, TZD is time zone) to date_str. If individual variables (year, month, day, hour, minute, second, zone) are used, use a foregoing homonymous subroutine. Format of date is conformed to gtool4 netCDF Convention "5.5 Expression of date and time"
If a string like as "s since 2009-06-17T11:23:45+09:00" is specified, A part "s since " is truncated automatically, and a part "2009-06-17T11:23:45+09:00" is set.
If an optional argument date is omitted, the date setting is stored to a "dc_calendar_types#DC_CAL_DATE" variable that is saved in the "dc_calendar". When date is omitted in subsequent procedures, the internal date is used. If date is not omitted, the settings is stored to the date. In order to use the date setting, use the "dc_calendar_types#DC_CAL_DATE" variable to subsequent procedures.
| [in] | date_str | Strings that express date and time. See gtool4 netCDF Convention 5.5 Expression of date and time for details. |
| [out] | date | An object that stores information of date and time. If this is omitted, these information is set as default date and time. |
| [out] | err | Exception handling flag. By default, when error occur in this procedure, the program aborts. If this err argument is given, .true. is substituted to err and the program does not abort. |
Definition at line 287 of file dccaldatecreate.f90.
References dc_trace::beginsub(), dc_error::dc_ebaddate, dc_error::dc_noerr, dc_calendar_internal::default_date, dc_types::dp, dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_types::token.