ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return the current or the requested date and time in the requested time zone newzone
(in units of minutes) as an integer-valued array of size 8
.
More...
Generate and return the current or the requested date and time in the requested time zone newzone
(in units of minutes) as an integer-valued array of size 8
.
If there is no input argument besides newzone
, then the output is the current date and time in the specified zone newzone
.
When the input argument values(:)
is present, the first four input arguments or the first four elements of the input vector values(:)
are mandatory and must be provided since they determine the old date and time zone of interest to be converted to the new time zone.
The rest of the elements containing the time of the day of the Gregorian Calendar are optional and taken to be zero if not provided.
[in] | newzone | : The input scalar of type integer of default kind IK, containing the new time zone of the Gregorian calendar in minutes. |
[in] | year | : The input scalar of type integer of default kind IK, containing the year of the Gregorian calendar.(optional, default = the current value if all input arguments are missing. It can be present only if values is missing.) |
[in] | month | : The input scalar of type integer of default kind IK, containing the month of the year of the Gregorian calendar.(optional, default = 1 (or the current value if all input arguments are missing). It must be present if year is also present.) |
[in] | day | : The input scalar of type integer of default kind IK, containing the day of the month of the year of the Gregorian calendar.(optional, default = 1 . (or the current value if all input arguments are missing). It must be present if month is also present.) |
[in] | zone | : The input scalar of type integer of default kind IK, containing the local time zone of the Gregorian calendar in minutes to be used to convert the UTC date and time to the local date and time.(optional, default = 0 (UTC) (or the current value if all input arguments are missing). It must be present if day is also present.) |
[in] | hour | : The input scalar of type integer of default kind IK, containing the hour of the day of the Gregorian calendar.(optional, default = 0 (or the current value if all input arguments are missing). It can be present only if zone is present.) |
[in] | minute | : The input scalar of type integer of default kind IK, containing the minute of the hour of the day of the Gregorian calendar.(optional, default = 0 (or the current value if all input arguments are missing). It can be present only if hour is present.) |
[in] | second | : The input scalar of type integer of default kind IK, containing the second of the minute of the hour of the day of the Gregorian calendar.(optional, default = 0 (or the current value if all input arguments are missing). It can be present only if minute is present.) |
[in] | millisecond | : The input scalar of type integer of default kind IK, containing the millisecond of the second of the minute of the hour of the day of the Gregorian calendar.(optional, default = 0 (or the current value if all input arguments are missing). It can be present only if second is present.) |
[in] | values | : The input contiguous vector of minimum size 4 and maximum size 8 of type integer of default kind IK, containing the values [year, month, day, zone, hour, minute, seconds, milliseconds] of the Gregorian calendar or a subset of the octuple starting with year .The order of the elements of the vector follows that of the values returned by the Fortran intrinsic date_and_time() .(optional, default = the current date and time. It can be present only if all other arguments except newzone are missing.) |
DateTimeNewZone(1:8)
: The output vector of size 8
of type integer
of default kind IK containing the requested date and time of the Gregorian Calendar in the new time zone newzone
corresponding to the input date and time in the order [year, month, day, zone, hour, minute, seconds, milliseconds]
. By definition, DateTimeNewZone(4)
(corresponding to the zone in minutes) has the same values as the input argument newzone
.
Possible calling interfaces ⛓
year = 0
corresponds to the historic 1 BC notation of the Gregorian calendar.month
must be a number between 1
and 12
.day
must be a number between 1
and 31
and be consistent with the specified month and (leap) year.zone
must be a valid time zone in units of minutes.hour
must be a number between 0
and 23
.minute
must be a number between 0
and 59
.second
must be a number between 0
and 59
.millisecond
must be a number between 0
and 999
.CHECK_ENABLED=1
.pure
procedure(s) documented herein become impure
when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1
.pure
in release
build and impure
in debug
and testing
builds.impure
when all optional
input arguments are missing.
Example usage ⛓
ifort
compiler ⛓ ifort
compiler ⛓ gfortran
compiler ⛓
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
Definition at line 2097 of file pm_dateTime.F90.