ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_dateTime.F90 File Reference

Go to the source code of this file.

Data Types

interface  pm_dateTime::dateTimeInt_type
 This is the derived type containing the components of a numeric date and time in the Gregorian calendar. More...
 
interface  pm_dateTime::dateTimeStr_type
 This is the derived type containing the string components that contain numeric date and time in the Gregorian calendar. More...
 
type  pm_dateTime::timeZone_type
 This is the derived type for generating object parameters containing a list of time zones and their representative abbreviations.
More...
 
interface  pm_dateTime::getZoneAbbr
 Generate and return the time zone abbreviation corresponding to the current local time or the specified zone in minutes. More...
 
interface  pm_dateTime::getHour12
 Generate and return the current 12-hour-clock local hour of the current day of the Gregorian calendar. More...
 
interface  pm_dateTime::getJulianDay
 Generate and return the Julian Date (Julian Day Number JDN + the fractional part of the day) from the input [year, month, day, zone, hour, minute, second, millisecond] of the Gregorian calendar date. More...
 
interface  pm_dateTime::getDateTimeShifted
 Generate and return the current or the requested Gregorian date and time shifted by the specified amount in units of days. More...
 
interface  pm_dateTime::getDateTimeDiff
 Generate and return the calendarical difference in days between the two input Gregorian dates octuples (Values1(:) - Values2(:)). More...
 
interface  pm_dateTime::getDateTimeUTC
 Generate and return the current or the requested date and time converted to the corresponding Coordinated Universal Time (UTC) as an integer-valued array of size 8. More...
 
interface  pm_dateTime::getDateTimeNewZone
 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...
 
interface  pm_dateTime::getDateTime
 Generate and return the current or the requested date and time as an integer-valued array of size 8 or a formatted string.
More...
 
interface  pm_dateTime::getWeekDate
 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...
 
interface  pm_dateTime::getWeekYear
 Generate and return the week year corresponding to the ISO 8601 Week Date triple [week year, week number, week day] equivalent of the input Gregorian date and time values(1:3) or (year, month, day) triple. More...
 
interface  pm_dateTime::isValidDateTime
 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...
 
interface  pm_dateTime::isLastDayInMonth
 Generate and return .true. if the input date (year, month, day) triple corresponds to the last day of a Gregorian Calendar month. More...
 
interface  pm_dateTime::getDateAfter
 Generate and return the date in the Gregorian Calendar that appears after the input date. More...
 
interface  pm_dateTime::getDateBefore
 Generate and return the date in the Gregorian Calendar that appears before the input date. More...
 
interface  pm_dateTime::getOrdinalDay
 Generate and return the ordinal day, also knowns as Day of Year (DOY), i.e., the number of days since the beginning of the input year until and including the input Gregorian Calendar date [year, month, day].
More...
 
interface  pm_dateTime::getWeekNumber
 Generate and return the Week Number, i.e., the number of weeks of the input year until and including the week containing the specified input Gregorian date. More...
 
interface  pm_dateTime::getWeekDay
 Generate and return the day number of the week of a Gregorian Calendar date, assuming Sunday is the zeroth day of the week. If there is no input argument, then the current day number of the week is returned. More...
 
interface  pm_dateTime::getWeekDayISO
 Generate and return the day number of the week of a Gregorian Calendar date, assuming Monday is the first day of the week. If there is no input argument, then the current day number of the week is returned. More...
 
interface  pm_dateTime::getCountDays
 Generate and return the total number of days in the specified year or the month of the year of the Gregorian calendar. More...
 
interface  pm_dateTime::getCountWeeks
 Generate and return the number of weeks in the specified year or the month of the year of the Gregorian calendar whose majority of days fall within the specified year or month. More...
 
interface  pm_dateTime::getCountLeapYears
 Generate and return the number of leap years within the closed year interval [since, until] where since represents the origin year, and until represents a later year after since. More...
 
interface  pm_dateTime::isMorning
 Generate and return .true. if the hour in the current or the input time zone (-720 : +840) is Ante Meridiem (before noon). More...
 
interface  pm_dateTime::isValidZone
 Generate and return .true. is the input time zone zone in units of minutes is valid (i.e., -12 * 60 <= zone <= +14 * 60).
More...
 

Modules

module  pm_dateTime
 This module contains classes and procedures for computing, manipulating, and styling dates and times.
 

Functions/Subroutines

type(dateTimeInt_type) function pm_dateTime::dateTimeInt_typer ()
 This is the constructor of the dateTimeInt_type class.
More...
 
integer(IK) function, dimension(8) pm_dateTime::getDateTimeIntValues (self)
 Generate and return an integer vector of length 8 containing all component values of the parent object of type dateTimeInt_type. More...
 
type(dateTimeStr_type) function pm_dateTime::dateTimeStr_typer ()
 This is the constructor of the dateTimeStr_type class.
More...
 
pure elemental logical(LK) function pm_dateTime::isLeapYear (year)
 Generate and return .true. if the input year is a leap year. More...
 
integer(IK) function pm_dateTime::getMillisecond ()
 Generate and return the current millisecond of the current second of the current minute of the local hour of the current day of the Gregorian calendar. More...
 
integer(IK) function pm_dateTime::getSecond ()
 Generate and return the current second of the current minute of the local hour of the current day of the Gregorian calendar. More...
 
integer(IK) function pm_dateTime::getMinute ()
 Generate and return the current minute of the local hour of the current day of the Gregorian calendar. More...
 
impure elemental integer(IKG) function pm_dateTime::getHour (zone)
 Generate and return the current local hour of the current day of the Gregorian calendar, or the hour at the specified time zone zone in minutes. More...
 
integer(IK) function pm_dateTime::getZone ()
 Generate and return the local time difference in minutes with respect to the Coordinated Universal Time (UTC). More...
 
integer(IK) function pm_dateTime::getDay ()
 Generate and return the current day of the Gregorian calendar. More...
 
integer(IK) function pm_dateTime::getMonth ()
 Generate and return the current month of the Gregorian calendar. More...
 
integer(IK) function pm_dateTime::getYear ()
 Generate and return the current year of the Gregorian calendar. More...
 

Variables

character(*, SK), parameter pm_dateTime::MODULE_NAME = "@pm_dateTime"
 
integer(IK), parameter pm_dateTime::ZONE_MIN = -12_IK * 60_IK
 The scalar constant of default integer kind IK representing the current minimum existing time zone value in the work in units of minutes. More...
 
integer(IK), parameter pm_dateTime::ZONE_MAX = +14_IK * 60_IK
 The scalar constant of default integer kind IK representing the current maximum existing time zone value in the work in units of minutes. More...
 
integer(IK), dimension(8), parameter pm_dateTime::ORIGIN = [integer(IK) :: 1, 1, 1, 0, 0, 0, 0, 0]
 The constant vector of size 8 of type integer of default kind IK containing origin of the Gregorian calendar in the same format as returned by the values argument of the Fortran intrinsic date_and_time(). More...
 
character(9, SK), dimension(0:6), parameter pm_dateTime::WEEKDAY_NAME = [ "Sunday " , "Monday " , "Tuesday " , "Wednesday" , "Thursday " , "Friday " , "Saturday " ]
 The character constant vector of shape (0:6) of length type parameter 9 containing the names of the days of a week assuming Sunday as the zeroth day of the week. More...
 
character(9, SK), dimension(1:7), parameter pm_dateTime::WEEKDAY_NAME_ISO = [ "Monday " , "Tuesday " , "Wednesday" , "Thursday " , "Friday " , "Saturday " , "Sunday " ]
 The character constant vector of size 7 of length type parameter 9 containing the names of the days of a week. More...
 
character(*, SK), dimension(12), parameter pm_dateTime::MONTH_NAME = [ "January " , "February " , "March " , "April " , "May " , "June " , "July " , "August " , "September" , "October " , "November " , "December " ]
 The character constant vector of size 12 of length type-parameter 9, containing full names of the months of the Gregorian calendar. More...
 
integer(IK), dimension(12), parameter pm_dateTime::DAYS_OF_MONTH = [integer(IK) :: 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
 The integer constant vector of size 12 containing number of days in each month of a common (non-leap) year of the Gregorian calendar. More...
 
integer(IK), dimension(12), parameter pm_dateTime::DAYS_OF_MONTH_LEAP = [integer(IK) :: 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
 The integer constant vector of size 12 containing number of days in each month of a leap year of the Gregorian calendar. More...
 
integer(IK), parameter pm_dateTime::SECONDS_PER_DAY = 86400_IK
 The constant scalar of type integer of kind IK containing the number of seconds per day. More...
 
integer(IK), parameter pm_dateTime::MINUTES_PER_DAY = 1440_IK
 The constant scalar of type integer of kind IK containing the number of minutes per day. More...
 
real(RK), parameter pm_dateTime::MEAN_DAYS_PER_MONTH = 0.25_RK * (0.25_RK * sum(DAYS_OF_MONTH) + sum(DAYS_OF_MONTH_LEAP) / 12._RK)
 The constant scalar of type real of default kind RK containing the average number of days per month. More...
 
real(RK), parameter pm_dateTime::MEAN_WEEKS_PER_MONTH = MEAN_DAYS_PER_MONTH / 7._RK
 The constant scalar of type real of default kind RK containing the approximate (rounded) average number of weeks per month. More...
 
real(RK), parameter pm_dateTime::MEAN_HOURS_PER_MONTH = 24_IK * MEAN_DAYS_PER_MONTH
 The constant scalar of type real of default kind RK containing the average number of hours per month. More...
 
real(RK), parameter pm_dateTime::MEAN_MINUTES_PER_MONTH = 60_IK * MEAN_HOURS_PER_MONTH
 The constant scalar of type real of default kind RK containing the average number of minutes per month. More...
 
real(RK), parameter pm_dateTime::MEAN_SECONDS_PER_MONTH = 60_IK * MEAN_MINUTES_PER_MONTH
 The constant scalar of type real of default kind RK containing the average number of seconds per month. More...
 
real(RK), parameter pm_dateTime::MEAN_DAYS_PER_YEAR = 0.25_RK * (3 * 365 + 366)
 The constant scalar of type real of default kind RK containing the average number of days per year. More...
 
real(RK), parameter pm_dateTime::MEAN_WEEKS_PER_YEAR = MEAN_DAYS_PER_YEAR / 7._RK
 The constant scalar of type real of default kind RK containing the approximate (rounded) average number of weeks per year. More...
 
real(RK), parameter pm_dateTime::MEAN_HOURS_PER_YEAR = 24_IK * MEAN_DAYS_PER_YEAR
 The constant scalar of type real of default kind RK containing the average number of hours per year. More...
 
real(RK), parameter pm_dateTime::MEAN_MINUTES_PER_YEAR = 60_IK * MEAN_HOURS_PER_YEAR
 The constant scalar of type real of default kind RK containing the average number of minutes per year. More...
 
real(RK), parameter pm_dateTime::MEAN_SECONDS_PER_YEAR = 60_IK * MEAN_MINUTES_PER_YEAR
 The constant scalar of type real of default kind RK containing the average number of seconds per year. More...
 
type(timeZone_type), parameter pm_dateTime::timeZone = timeZone_type()
 This is an object parameter of type timeZone_type containing a list of time zones and their representative abbreviations.
More...