ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return the ISO 8601 Week Date triple [week year, week number, week day]
corresponding to the input Gregorian date and time values(1:3)
or (year, month, day)
triple.
More...
Generate and return the ISO 8601 Week Date triple [week year, week number, week day]
corresponding to the input Gregorian date and time values(1:3)
or (year, month, day)
triple.
The ISO week date system is a leap week calendar system that is part of the \(\ms{ISO 8601}\) date and time standard issued by the International Organization for Standardization (ISO) since 1988 It is (mainly) used in government and business for fiscal years, as well as in timekeeping.
The system specifies a week year atop the Gregorian calendar by defining a notation for ordinal weeks of the year.
The following table contains examples of the Gregorian Calendar date and their corresponding Week Dates.
Gregorian Date | ISO Date | ISO Week Date |
---|---|---|
Sat 1 Jan 1977 | 1977-01-01 | 1976-W53-6 |
Sun 2 Jan 1977 | 1977-01-02 | 1976-W53-7 |
Sat 31 Dec 1977 | 1977-12-31 | 1977-W52-6 |
Sun 1 Jan 1978 | 1978-01-01 | 1977-W52-7 |
Mon 2 Jan 1978 | 1978-01-02 | 1978-W01-1 |
Sun 31 Dec 1978 | 1978-12-31 | 1978-W52-7 |
Mon 1 Jan 1979 | 1979-01-01 | 1979-W01-1 |
Sun 30 Dec 1979 | 1979-12-30 | 1979-W52-7 |
Mon 31 Dec 1979 | 1979-12-31 | 1980-W01-1 |
Tue 1 Jan 1980 | 1980-01-01 | 1980-W01-2 |
Sun 28 Dec 1980 | 1980-12-28 | 1980-W52-7 |
Mon 29 Dec 1980 | 1980-12-29 | 1981-W01-1 |
Tue 30 Dec 1980 | 1980-12-30 | 1981-W01-2 |
Wed 31 Dec 1980 | 1980-12-31 | 1981-W01-3 |
Thu 1 Jan 1981 | 1981-01-01 | 1981-W01-4 |
Thu 31 Dec 1981 | 1981-12-31 | 1981-W53-4 |
Fri 1 Jan 1982 | 1982-01-01 | 1981-W53-5 |
Sat 2 Jan 1982 | 1982-01-02 | 1981-W53-6 |
Sun 3 Jan 1982 | 1982-01-03 | 1981-W53-7 |
When all input arguments are missing, the procedures under this generic interface return the current ISO Week Date.
[in] | values | : The input contiguous array of shape (:) , of size 3 or larger, of type integer of default kind IK, containing the [year, month, day] triple of the Gregorian calendar.For the current local date, this triple can be obtained from the Fortran intrinsic date_and_time() or getDateTime().Only the first three elements ( values(1:3) ) are used to compute the output.The ability to pass longer vectors as input is to allow the output values(1:8) of various functionalities of this module to be passed directly to the procedures under this generic interface.(optional. It can 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 the year of the Gregorian calendar.(optional. It can be present if and 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 the month of the Gregorian calendar.(optional. It must be present if and 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 the day of the Gregorian calendar.(optional. It must be present if and only if the input argument month is present.) |
WeekDate
: The output array of shape (1:3)
of type integer
of default kind IK containing the ISO 8601 Week Date triple [week year, week number, week day]
.
Possible calling interfaces ⛓
values(:)
must be at least 3
and at most 8
.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. The procedures under this generic interface are always impure
when all 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 2573 of file pm_dateTime.F90.