ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return .true.
if the input date and time values(:)
or (year, month, day, zone, hour, second, millisecond)
octuple corresponds to a valid Gregorian Calendar date and time.
More...
Generate and return .true.
if the input date and time values(:)
or (year, month, day, zone, hour, second, millisecond)
octuple corresponds to a valid Gregorian Calendar date and time.
Returning the correct result requires taking into account the possibility of leap years and the varying day counts of months.
A valid date requires,
month
between 1
and 12
,day
between 1
and 31
and consistent with the specified month and year,zone
must be between -12:00
and +14:00
UTC, corresponding to -720
and +840
minutes as used here.hour
of day between 0
and 23
,minute
of hour between 0
and 59
,second
of minute between 0
and 59
,millisecond
of second between 0
and 999
.[in] | values | : The input contiguous array of shape (:) of type integer of default kind IK, containing the octuple [year, month, day, zone, hour, minute, second, millisecond] or a subset of it that always starts with year representing a Gregorian calendar date and/or time.The order of the elements of values follows that of the values argument of the Fortran intrinsic date_and_time() .(optional. It must be present if and only if all other input arguments are missing.) |
[in] | year | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing a year of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument values is missing.) |
[in] | month | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing a month of a year of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument year is present.) |
[in] | day | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing a day of a month of a year of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument month is present.) |
[in] | zone | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing a time zone of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument day is present.) |
[in] | hour | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing the hour of a day of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument zone is present.) |
[in] | minute | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing the minute of the hour of a day of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument hour is present.) |
[in] | second | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing the second of the minute of the hour of a day of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument minute is present.) |
[in] | millisecond | : The input scalar, or array of the same shape as other array-like arguments, of type integer of default kind IK, containing the millisecond of the second of the minute of the hour of a day of the Gregorian calendar.(optional, default = any value that yields a valid date given the other input argument. It can be present only if the input argument second is present.) |
isValid
: The output scalar or array of the same shape as the input array-like arguments (except Vector
), of type logical
of default kind LK. It is .true.
if and only if the input argument(s) correspond to a valid date and/or month of the Gregorian Calendar..false.
is the input date and time is invalid or if the condition 0 < size(values) < 9
does not hold.
Possible calling interfaces ⛓
year = 0
corresponds to the historic 1 BC notation of the Gregorian calendar.0
is a leap year.values(:)
must be non-zero and less than 8
, otherwise, the returned value is .false.
.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.elemental
. The procedures under this generic interface are non-elemental when the input argument values(:)
is present.
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 2795 of file pm_dateTime.F90.