Date/Time manipulation routines. Exception support Math support Basic types Number of days in a week. Number of weeks in fortnight Number of months in a year Number of years in a decade Number of years in a century Number of years in a millenium ISO day number for Monday ISO day number for Tuesday ISO day number for Wednesday ISO day number for Thursday ISO day number for Friday ISO day number for Saturday ISO day number for Sunday One hour as a fraction of a day (suitable for TDateTime) One minute as a fraction of a day (suitable for TDateTime) One second as a fraction of a day (suitable for TDateTime) One millisecond as a fraction of a day (suitable for TDateTime) Array with number of days in a year. The boolean index indicates whether it is a leap year or not. Bitmask deciding what to do with each TDateTime field in recode routines Average number of days in a month, measured over a year. Used in . Average number of days in a year, measured over 4 years. Used in . Extract the date part from a DateTime indication. Date part of AValue. Datetime to extract date from Extract the time part from a DateTime indication. Time part of AValue. Datetime to extract time from Determine whether a date is in a leap year. True if AValue is in a leap year, False if not. Date to be checked. Determine whether a time is PM or AM. True if the time part of AValue is PM (afternoon). Time to check. Check whether a set of values is a valid date indication. True if the given values form a valid date, False if not. Year value Month in the year Day in the month Check whether a set of values is a valid time indication. True if the given values form a valid time, False if not. Hour of the day. Minute in the hour Second in the minute Milliseconds in the second Check whether a set of values is a valid date and time indication. True if the given values form a valid date/time pair, False if not. Year value Month in the year Day in the month Hour of the day Minute in the hour Second in the minute Milliseconds in the second Check whether a given year/day of year combination is a valid date. True if the given combination is a valid date, False otherwise. Year Day in the year Check whether a given year/week/day of the week combination is a valid day. True if the given combination is a valid date, False otherwise. Year Week in the year Day in the week Check whether a given year/month/week/day of the week combination is a valid day True if the given combination is a valid date, False otherwise. Year Month of the year Week of the month. Day in the week. return the number of weeks in the year, given a date Number of weeks. Day in the year. Return the number of weeks in a given year Number of weeks in AYear A (valid) year. Return the number of days in the year in which a date occurs. Number of days in the year in which AValue occurs. Date in year of which to calculate the number of days. Number of days in a particular year. Number of days in year AYear. Year to return the number of days from Return the number of days in the month in which a date occurs. Number of days in the month in which AValue occurs. Date in month of which to calculate the number of days. Number of days in a month of a certain year. The number of days in month AMonth, in year AYear. Year in which the month occurs. Month of which the number of days should be returned. Return the current date Current day as TDateTime. Return the previous day. Previous day as TDateTime. Return the next day Next day as TDateTime. Check whether a given date is today. True if AValue is today, False otherwise. Date to check, may contain a time part. Check if two date/time indications are the same day. True if AValue and ABasis are on the same day, False otherwise.. First date/time Second date/time Given a day of the week, return the previous day of the week. The day of the week prior to DayOfWeek Day of the week. Extract the year from a given date. Year part of AValue Date to extract year from. Extract the month from a given date. Month part of AValue Date to extract month from. Extract week (of the year) from a given date. Week part of AValue. Date to extract week from. Extract the day (of month) part from a DateTime value Day of month part of AValue. Date to extract day of. Extract the hour part from a DateTime value. Hour part of AValue. Date/time value to extract hour from. Extract the minute part from a DateTime value. Minute part of AValue. Date/time value to extract minute from. Extract the second part from a DateTime value. Second part of AValue. Date/time value to extract second from. Extract the millisecond part from a DateTime value. Millisecond part of AValue. Date/time value to extract millisecond from. Return the first day of the year, given a date in this year. First day of the year as a TDateTime value. Date in year of which to return the start Calculate a DateTime value representing the last day of a year, given a date in that year. DateTime value representing the end of the year in which AValue falls. Date in the year of which the end should be calculated Return the first day of a given year. First day of AYear as a TDateTime Year to get first date from. Calculate a DateTime value representing the last day of a year DateTime representing the last day of AYear. Year to calculate last day from Calculate the first day of the month, given a date in that month. First day of month as a TDateTime value. Date to return first of month from Calculate a DateTime value representing the last day of the month, given a day in that month. DateTime value representing the last day of the month in which AVAlue is a day. Day in the month of which the last day should be returned. Return first date of month, given a year/month pair. First day of the month AMonth in AYear A year. Month in the year. Calculate a datetime value representing the last day of the indicated month DateTime value indicating the last day of AMonth in year AYear. Year in which month occurs Month to calculate end of Return the first day of the week, given a date. First day of the week, in TDateTime format. Day in the week. Calculate a DateTime value which represents the end of a week, given a date in that week. DateTime value representing the last day of the week in which AVAlue is a day. Day in the week of which the last day should be calculated. Return the first day of the week, given a year and a week in the year. First day of the given week, in TDateTime format. Year Week in the year Day in the week (default 1) Day of the week Calculate a datetime value which represents the end of a specified week. DateTime value representing the end of the week specified by AYear, AWeekOfYear and DayOfWeek Year Week of the year Calculate the start of the day as a DateTime value, given a moment in the day. Start of the day (00:00) as DateTime value DateTime from which to calculate start of the day. Calculate a datetime value that represents the end of a given day. A datetime value representing the time 23:59:59.999 of the day AValue. Day to calculate the end of Return the start of a day as a DateTime value, given a day indication Start of the given day as DateTime Year Month in the year Day in the month. Day in the year. Calculates a DateTime value representing the end of a specified day A datetime value representing the time 23:59:59.999 of the given day. Year Month in the year Day in the month Day of the year Extract the month of a DateTime indication. The month part of AValue Date from which to extract month Extract the week of the year (and optionally year) of a DateTime indication. Week of the year in which Avalue falls. Date from which to extract week. Year part of AValue Extracts the day of the week from a DateTime value Day of the year from AValue. DateTime to extract the day of the year from. Calculate the number of hours passed since the start of the year. Number of hours passed since the start of the year till AValue . DateTime value for which to calculate the hour of the year Calculate the number of minutes elapsed since the start of the year Number of minutes elapsed since the start of the year. Moment in the year. Calculate the number of seconds elapsed since the start of the year. Number of seconds elapsed since the start of the year. Moment in the year Calculate the number of milliseconds elapsed since the start of the year. Number of seconds elapsed since the start of the year. Moment in the year Extract the week of the month (and optionally month and year) from a DateTime value Week of the month Datetime value of which to calculate the week, month and year. Year part of AValue Month part of AValue Extract the day (of month) part of a DateTime value Day in the month Datetime value to extract day from. Calculate the number of hours passed since the start of the month. Number of hours passed since the start of the month till AValue. DateTime value for which to calculate the hour of the month. Calculate number of minutes elapsed since the start of the month. Number of minutes elapsed since the start of the month. Moment in the month. Calculate number of seconds elapsed since the start of the month. Number of seconds elapsed since the start of the month. Moment in the month. Calculate number of milliseconds elapsed since the start of the month. Number of milliseconds elapsed since the start of the month. Moment in the month Extracts the day of the week from a DateTime value Day of the week from AValue. DateTime to extract the day of the week from. Calculate the number of hours elapsed since the start of the week. Number of hours elapsed since the start of the week till AValue. DateTime value for which to calculate the hour of the week. Calculate the number of seconds elapsed since the start of the week Number of seconds elapsed since the start of the week Moment in the week. Calculate the number of seconds elapsed since the start of the week Number of seconds elapsed since the start of the week Moment in the week Calculate the number of milliseconds elapsed since the start of the week Calculate the hour of a given DateTime value Hour part of AValue. DateTime to calculate the hour of. Calculate the number of minutes elapsed since the start of the day Number of minutes elapsed since the start of the day Moment in the day Calculate the number of seconds elapsed since the start of the day Number of seconds elapsed since the start of the day Moment in the day Calculate the number of milliseconds elapsed since the start of the day Number of milliseconds elapsed since the start of the day Moment in the day Calculate the number of minutes elapsed since the start of the hour Number of minutes elapsed since the start of the hour Moment in the hour Calculate the number of seconds elapsed since the start of the hour Number of seconds elapsed since the start of the hour Moment in the hour Calculate the number of milliseconds elapsed since the start of the hour Number of milliseconds elapsed since the start of the hour Moment in the hour Calculate the number of seconds elapsed since the start of the minute Number of seconds elapsed since the start of the minute Moment in the minute Calculate the number of milliseconds elapsed since the start of the minute Number of milliseconds elapsed since the start of the minute Moment in the minute Calculate the number of milliseconds elapsed since the start of the second Number of milliseconds elapsed since the start of the second Moment in the second Check whether two datetimes are only a number of years apart True if ANow and Athen are only AYears apart, false otherwise First moment in time Second moment in time Number of years to check Check whether two datetimes are only a number of months apart True if ANow and Athen are only AMonths apart, false otherwise First moment in time Second moment in time Number of months to check Check whether two datetimes are only a number of weeks apart True if ANow and Athen are only AWeeks apart, false otherwise First moment in time Second moment in time Number of weeks to check Check whether two datetimes are only a number of days apart True if ANow and Athen are only ADays apart, false otherwise First moment in time Second moment in time Number of days to check Check whether two datetimes are only a number of hours apart True if ANow and Athen are only AHours apart, false otherwise First moment in time Second moment in time Number of hours to check Check whether two datetimes are only a number of minutes apart True if ANow and Athen are only AMinutes apart, false otherwise First moment in time Second moment in time Number of minutes to check Check whether two datetimes are only a number of seconds apart True if ANow and Athen are only ASeconds apart, false otherwise First moment in time Second moment in time Number of seconds to check Check whether two datetimes are only a number of milliseconds apart True if ANow and Athen are only AMilliSeconds apart, false otherwise First moment in time Second moment in time Number of milliseconds to check Calculate the number of whole years between two DateTime values Number of whole years between ANow and AThen. First moment in time Second moment in time Calculate the number of whole months between two DateTime values Number of whole months between ANow and AThen. First moment in time Second moment in time Calculate the number of whole weeks between two DateTime values Number of whole weeks between ANow and AThen. First moment in time Second moment in time Number of whole days between two DateTime values. Number of whole days between ANow and AThen. First date Second date Calculate the number of whole hours between two DateTime values. Number of hours between ANow and AThen First DateTime value Second DateTime value Calculate the number of whole minutes between two DateTime values. Number of minutes between ANow and AThen First moment in time Second moment in time Calculate the number of whole seconds between two DateTime values. Number of seconds between ANow and AThen First moment in time Second moment in time Calculate the number of whole milliseconds between two DateTime values. Number of milliseconds between ANow and AThen First moment in time Second moment in time Calculate the approximate number of years between two DateTime values. Number (fractions included) of years between ANow and AThen First moment in time Second moment in time Calculate the approximate number of months between two DateTime values. Number (fractions included) of months between ANow and AThen First moment in time Second moment in time Calculate the approximate number of weeks between two DateTime values. Number (fractions included) of weeks between ANow and AThen First moment in time Second moment in time Calculate the approximate number of days between two DateTime values. Number (fractions included) of days between ANow and AThen First moment in time Second moment in time Calculate the approximate number of hours between two DateTime values. Number (fractions included) of hours between ANow and AThen First moment in time Second moment in time Calculate the approximate number of minutes between two DateTime values. Number (fractions included) of minutes between ANow and AThen First moment in time Second moment in time Calculate the approximate number of seconds between two DateTime values. Number (fractions included) of seconds between ANow and AThen First moment in time Second moment in time alculate the approximate number of seconds between two DateTime values.

Since millisecond are the smallest unit of a TDateTime value, the number will always be an integer value, even though a double is returned.

Number (fractions included) of seconds between ANow and AThen First moment in time Second moment in time Increase a DateTime value with a number of years. DateTime representing AValue plus ANumberOfYears years. DateTime to which years should be added. Number of weeks to add Increase a DateTime value with a number of weeks. DateTime representing AValue plus ANumberOfWeeks weeks. DateTime to which weeks should be added. Number of days to add. Increase a DateTime value with a number of days. DateTime representing AValue plus ANumberOfDays days. DateTime value to which days should be added. Number of hours to add Increase a DateTime value with a number of hours. DateTime representing AValue plus ANumberOfHours hours. DateTime to which hours should be added. Number of minutes to add Increase a DateTime value with a number of minutes. DateTime representing AValue plus ANumberOfMinutes minutes. DateTime to which minutes should be added. Number of seconds to add Increase a DateTime value with a number of seconds. DateTime representing AValue plus ANumberOfSeconds seconds. DateTime to which seconds should be added. Number of milliseconds to add Increase a DateTime value with a number of milliseconds. DateTime representing AValue plus ANumberOfMilliSeconds milliseconds. DateTime to which milliseconds should be added. Encodes a DateTime value from all its parts DateTime value representing the complete timestamp Year Month Day of the month Hour of the day Minutes Seconds Milliseconds Decode a datetime value in a date and time value DateTime to decode Returns the year part of AValue. Returns the month part of AValue. Returns the day part of AValue. Returns the hour part of AValue. Returns the minute part of AValue. Returns the second part of AValue. Returns the millisecond part of AValue. Encode a Year, Month, Day, Hour, minute, seconds, milliseconds tuplet to a TDateTime value True if the encoding was succesful Year Month in year Day in month Hour of the day Minutes in the hour Seconds in the minute Millisecond in the second Encoded TDateTime value. Encode a TDateTime value from a year, week and day of week triplet DateTime value representing AYear, AWeekOfYear and ADayOfWeek. Year part Week of the year part Decode a DateTime value in a week of year and day of week. DateTime to decode Returns the year part of AValue. Returns the week of year part of AValue. Returns the day of week part of AValue. Encode a year, week and day of week triplet to a TDateTime value True if the encoding was succeful, False otherwise. Year Week in the year Encoded TDateTime value Day of the week (default 1). Encodes a year and day of year to a DateTime value DateTime value representing the date specified by AYear and ADayOfYear. Year part. Day of the year part Decode a DateTime value in year and year of day. DateTime to decode Returns the year part of AValue Returns the day-of-year part of AValue Encode a year and day of year to a TDateTime value True if the encoding was succesful, False if not. Year Day in the year Encoded TDateTime value. Encodes a year, month, week of month and day of week to a DateTime value DateTime value representing the date specified by AYear, AMonth, AWeekOfMonth and ADayOfWeek. Year part Month part Week of the month part Day of the week part Decode a DateTime value in a month, week of month and day of week DateTime to decode Returns the year part of AValue. Returns the month part of AValue. Returns the week of month part of AValue. Returns the day of week part of AValue. Encode a year, month, week of month and day of week to a TDateTime value True if the encoding was succesful, False if not. Year Month in the year Week in the month Day in the week Encoded TDateTime value Replace year part of a TDateTime value with another year. AValue with replaced year. Date to recode Year to replace in AValue Replace month part of a TDateTime value with another month. AValue with replaced month. Date to recode Month to replace in AValue Replace day part of a TDateTime value with another day. AValue with replaced day. Date to recode Day to replace in AValue Replace hours part of a TDateTime value with another hour. AValue with replaced hour. Date/time to recode Hour to replace in AValue Replace minutse part of a TDateTime value with another minute. AValue with replaced minute. Date/time to recode Minute to replace in AValue Replace seconds part of a TDateTime value with another second. AValue with replaced second. Date/time to recode Second to replace in AValue Replace milliseconds part of a TDateTime value with another millisecond. AValue with replaced millisecond. Date/time to recode Millisecond to replace in AValue Replace date part of a TDateTime value with another date. AValue with replaced date. Date/time to recode Year to replace in AValue Month to replace in AValue Day to replace in AValue Replace time part of a TDateTime value with another time. AValue with replaced time. Date/time to recode Hour to replace in AValue Minute to replace in AValue Second to replace in AValue Millisecond to replace in AValue Replace selected parts of a TDateTime value with other values AValue with replaced parts Date/time to recode New value for year part New value for month part New value for day part New value for hour part New value for minute part New value for second part New value for millisecond part Replace selected parts of a TDateTime value with other values True if the recoding was succesful, False if not. Date/time to recode New value for year part New value for month part New value for day part New value for hour part New value for minute part New value for second part New value for millisecond part Recoded AValue. Compare 2 dates, taking into account the time of day A negative number if A is earlier than B, zero if they are equal, or positive if A is later than B. First date-time to compare First date-time to compare Compare 2 dates, disregarding the time of day A negative number if date A is before B, zero if they are equal, or positive if A is after B. First date to compare Second date to compare Compares two times of the day, disregarding the date part. A negative number if A is before B, zero if they are equal, or positive A is later than B. First time to compare Second time to compare Check whether two TDateTime values have the same date and time parts. True if A and B have the same date and time parts, False if not. First DateTime value Second DateTime value Check whether two TDateTime values have the same date part. True if A and B have the same time part, False if not First DateTime value Second DateTime value Check whether two TDateTime values have the same time part. True if A and B have the same time part, False if not. First DateTime value Second DateTime value Calculate which occurrence of weekday in the month a given day represents Occurrence of weekday in the month of AValue. Date to check. Decode a DateTime value in year, month, day of week parts DateTime to decode Returns the year part of AValue. Returns the month part of AValue. Returns which ADayofWeek of AValue. Returns the day of week part of AValue. Encodes a year, month, week, day of week specification to a TDateTime value TDateTime value representing AYear , AMonthANthDayOfWeek .and ADayOfWeek. Year Month in the year Week in the month Day of the week Encode a year, month, week, day of week triplet to a TDateTime value True if the encoding was succesful, False if not. Year Month in year Day of week occurrence Day of week Resulting TDateTime value Base date time to use when creating the string representing the date/time. Default 0 Raise an EConvertError about an invalid date-time specification. Year Month in the year Day of the month Hour of the day Minute of the hour Seconds in the minute Milliseconds in second Raise an EConvertError with an invalid Year, WeekOfyear and DayOfWeek specification Raise an EConvertError exception when a day is not a valid day of a year. Year Invalid day of the year. Raise an EConvertError exception when a Year,Month,WeekOfMonth,DayofWeek is invalid. Year Month of the year Week of the month Day of the week Raise an EConvertError exception when a Year,Month,NthDayofWeek,DayofWeek is invalid. Year Month in the year Nth occurrence of day of week. Day of week. Converts a TDateTime value to a Julian date representation Julian representation of AValue. DateTime value to convert to Julian representation Convert a Julian date representation to a TDateTime value. Resulting TDateTime Date in Julian notation Convert a Julian date representation to a TDateTime value. True if the conversion was succesful, False if not. Date in Julian notation Resulting TDateTime equivalent Convert a TDateTime value to a modified Julian date representation Modified Julian representation of AValue. DateTime value to convert to Modified Julian representation Convert a modified Julian date representation to a TDateTime value. AValue in modified Julian date notation. Date to convert Convert a modified Julian date representation to a TDateTime value. True if the conversion was succesful, False if not. Modified Julian date to convert AValue as a TDateTime value. Convert a TDateTime value to Unix epoch time Unix epoch time corresponding to AValue DateTime value to convert Convert Unix epoch time to a TDateTime value AValue as a TDateTime value. Date to convert.