Go to the source code of this file.
Functions/Subroutines | |
| character(string) function | dcdatetimetochar (time) |
| Convert DC_DATETIME, DC_DIFFTIME to character strings. | |
| character(string) function | dcdifftimetochar (diff) |
| character(token) function | dcdatetimetocharcal (time, upcase) |
| character(string) function dcdatetimetochar | ( | type(dc_datetime), intent(in) | time | ) |
Convert DC_DATETIME, DC_DIFFTIME to character strings.
Procedures described in this file are provided from "dc_date" module.
Convert DC_DATETIME to character string
Convert a dc_date_types#DC_DATETIME variable to a character variable and return it. The format is a complete notation according to JIS X 0301 as follows:
YYYY-MM-DDThh:mm:ss.sTZD
YYYY is year, MM is month, DD is day, hh is hour, mm is minute, ss.s is seconds, and TZD is timezone.
| [in] | time | Datetime to convert |
Definition at line 52 of file dcdatetimetochar.f90.
References dc_types::dp, dc_types::string, and dc_types::token.
| character(token) function dcdatetimetocharcal | ( | type(dc_datetime), intent(in) | time, |
| logical, intent(in), optional | upcase ) |
Convert calendar type of DC_DATETIME to character string
Return the calendar type of a dc_date_types#DC_DATETIME variable as a character string. Currently supported calendars are as follows. Left is the integer variable representing the calendar, right is the returned string. If .true. is given to upcase, the string is returned in uppercase.
| Calendar type constant | Returned string |
|---|---|
| dc_date_types#CAL_CYCLIC | cyclic |
| dc_date_types#CAL_NOLEAP | noleap |
| dc_date_types#CAL_JULIAN | julian |
| dc_date_types#CAL_GREGORIAN | gregorian |
| [in] | time | Datetime whose calendar type to convert |
| [in] | upcase | If .true., return uppercase string |
Definition at line 243 of file dcdatetimetochar.f90.
References dc_date_types::cal_cyclic, dc_date_types::cal_gregorian, dc_date_types::cal_julian, dc_date_types::cal_noleap, dc_present::present_and_true(), and dc_types::token.
| character(string) function dcdifftimetochar | ( | type(dc_difftime), intent(in) | diff | ) |
Convert DC_DIFFTIME to character string
Convert a dc_date_types#DC_DIFFTIME variable to a character variable and return it. The format is as follows:
+YYYY-MM-DDThh:mm:ss.s -YYYY-MM-DDThh:mm:ss.s
YYYY is year, MM is month, DD is day, hh is hour, mm is minute, ss.s is seconds. Note that DD may exceed 2 digits. (dc_date_types#DC_DIFFTIME is a data type for expressing "X months later", "X days before", etc., so it does not carry up days to months or carry down months to days. It also does not hold "year" information. The number of days in a year or month is determined by the dc_date_types#DC_DATETIME side).
If the unit was set to '1' in DCDiffTimeCreate, it is treated as non-dimensional time, so the format becomes:
ss.s
| [in] | diff | Time difference to convert |
Definition at line 147 of file dcdatetimetochar.f90.
References dc_types::dp, and dc_types::string.