module DateTime:sig..end
Relative offset of the timezone to UTC
type _TZrel
type _timezone
Internal Representation of a timezone
type xs_time
xs:time datatype
type xs_date
xs:date datatypes
type xs_dateTime
xs:dateTime datatype consisting of a date value and a time value
type xs_duration
xs:duration datatype consisting of a year,month,day,hour,minute, and second
type xs_gYearMonth
xs:gYearMonth datatype consisting of a year value and a month value
type xs_gYear
xs:gYear datatype consisting of a year value
type xs_gMonthDay
xs:gMonthDay datatype consisting of a month value and a day value
type xs_gDay
xs:gDay datatype consisting of a day value
type xs_gMonth
xs:gMonth datatype consisting of a month value
type xs_yearMonthDuration
xs:yearMonthDuration datatype
type xs_dayTimeDuration
xs:dayTimeDuration datatype
string_of_ functions
val string_of_date : xs_date -> stringGives the string value of an xs_date
val string_of_duration : xs_duration -> string
val string_of_gYearMonth : xs_gYearMonth -> string
val string_of_gYear : xs_gYear -> string
val string_of_gMonthDay : xs_gMonthDay -> string
val string_of_gDay : xs_gDay -> string
val string_of_gMonth : xs_gMonth -> string
val string_of_time : xs_time -> stringGives the string value of an xs_time
val string_of_dateTime : xs_dateTime -> stringGives the string value of an xs_dateTime
val string_of_yearMonthDuration : xs_yearMonthDuration -> stringGives the string representation of a yearMonthDuration
val canonical_of_yearMonthDuration : xs_yearMonthDuration -> string
val string_of_dayTimeDuration : xs_dayTimeDuration -> stringGives the string representation of a dayTimeDuration
val canonical_of_dayTimeDuration : xs_dayTimeDuration -> stringConstructors for the date/time datatypes
val mkdate : int option * int * int * xs_dayTimeDuration option ->
xs_dateTakes a year, month, day, and timezone as a duration and returns an xs_date datatype.
val mktime : int * int * Decimal._decimal * xs_dayTimeDuration option ->
xs_timeTakes an hour, minute, second and timezone as a duration and returns an xs_time datatype.
Takes an hour, minute, second and timezone as a duration and returns an xs_time datatype.
val mktime_dtd : int * int * Decimal._decimal * xs_dayTimeDuration option ->
xs_dayTimeDuration * xs_time
val mkdateTime : xs_date * xs_time * xs_dayTimeDuration option ->
xs_dateTimeTakes a date, a time, and a timezone as a duration and returns an xs_dateTime
val mkgYearMonth : int * int * xs_dayTimeDuration option -> xs_gYearMonth
val mkgYear : int * xs_dayTimeDuration option -> xs_gYear
val mkgMonthDay : int * int * xs_dayTimeDuration option -> xs_gMonthDay
val mkgDay : int * xs_dayTimeDuration option -> xs_gDay
val mkgMonth : int * xs_dayTimeDuration option -> xs_gMonth
val mkyearMonthDuration : int * int -> xs_yearMonthDurationTakes a number of years and a number of months and returns a yearMonthDuration
val zero_yearMonthDuration : xs_yearMonthDuration
val mkdayTimeDuration : int * int * int * Decimal._decimal -> xs_dayTimeDurationTakes a number of days, hours, minutes, and seconds and returns a dayTimeDuration
val zero_dayTimeDuration : xs_dayTimeDuration
val mkduration : bool ->
xs_yearMonthDuration * xs_dayTimeDuration ->
xs_durationOperations Comparisons and Arithmetic operations
val date_compare : xs_dayTimeDuration option ->
xs_date -> xs_date -> intCompares two dates. The dayTimeDuration option is the timezone used if one of the dates does not contain a timezone.
val duration_compare : xs_duration -> xs_duration -> int
val gYearMonth_compare : xs_dayTimeDuration option ->
xs_gYearMonth -> xs_gYearMonth -> int
val gYear_compare : xs_dayTimeDuration option ->
xs_gYear -> xs_gYear -> int
val gMonthDay_compare : xs_dayTimeDuration option ->
xs_gMonthDay -> xs_gMonthDay -> int
val gDay_compare : xs_dayTimeDuration option ->
xs_gDay -> xs_gDay -> int
val gMonth_compare : xs_dayTimeDuration option ->
xs_gMonth -> xs_gMonth -> int
val add_yearMonthDuration_to_date : xs_date -> xs_yearMonthDuration -> xs_dateAdd a yearMonthDuration to a date yielding the new date
val add_dayTimeDuration_to_date : xs_date -> xs_dayTimeDuration -> xs_dateval subtract_dates : xs_date -> xs_date -> xs_dayTimeDurationval subtract_yearMonthDuration_from_date : xs_date -> xs_yearMonthDuration -> xs_dateval subtract_dayTimeDuration_from_date : xs_date -> xs_dayTimeDuration -> xs_dateval time_compare : xs_dayTimeDuration option ->
xs_time -> xs_time -> intval add_dayTimeDuration_to_time : xs_time -> xs_dayTimeDuration -> xs_timeval subtract_dateTimes : xs_dateTime -> xs_dateTime -> xs_dayTimeDurationval subtract_dates : xs_date -> xs_date -> xs_dayTimeDurationval subtract_times : xs_time -> xs_time -> xs_dayTimeDurationval subtract_dayTimeDuration_from_time : xs_time -> xs_dayTimeDuration -> xs_timeval dateTime_compare : xs_dayTimeDuration option ->
xs_dateTime -> xs_dateTime -> intval add_yearMonthDuration_to_dateTime : xs_dateTime -> xs_yearMonthDuration -> xs_dateTimeval add_yearMonthDuration_to_dateTime2 : xs_yearMonthDuration -> xs_dateTime -> xs_dateTime
val add_dayTimeDuration_to_dateTime : xs_dateTime -> xs_dayTimeDuration -> xs_dateTimeval subtract_dateTimes : xs_dateTime -> xs_dateTime -> xs_dayTimeDurationval subtract_yearMonthDuration_from_dateTime : xs_dateTime -> xs_yearMonthDuration -> xs_dateTimeval subtract_dayTimeDuration_from_dateTime : xs_dateTime -> xs_dayTimeDuration -> xs_dateTimeval dateTime_from_date_and_time : xs_date -> xs_time -> xs_dateTime
val yearMonthDuration_compare : xs_yearMonthDuration -> xs_yearMonthDuration -> intval add_yearMonthDurations : xs_yearMonthDuration ->
xs_yearMonthDuration -> xs_yearMonthDurationval subtract_yearMonthDurations : xs_yearMonthDuration ->
xs_yearMonthDuration -> xs_yearMonthDurationval multiply_yearMonthDuration : xs_yearMonthDuration -> float -> xs_yearMonthDurationval multiply_yearMonthDuration2 : float -> xs_yearMonthDuration -> xs_yearMonthDuration
val divide_yearMonthDuration : xs_yearMonthDuration -> float -> xs_yearMonthDurationval divide_yearMonthDuration_by_yearMonthDuration : xs_yearMonthDuration ->
xs_yearMonthDuration -> Decimal._decimalval dayTimeDuration_compare : xs_dayTimeDuration -> xs_dayTimeDuration -> intval add_dayTimeDurations : xs_dayTimeDuration ->
xs_dayTimeDuration -> xs_dayTimeDurationval subtract_dayTimeDurations : xs_dayTimeDuration ->
xs_dayTimeDuration -> xs_dayTimeDurationval multiply_dayTimeDuration : xs_dayTimeDuration -> float -> xs_dayTimeDurationval multiply_dayTimeDuration2 : float -> xs_dayTimeDuration -> xs_dayTimeDuration
val divide_dayTimeDuration : xs_dayTimeDuration -> float -> xs_dayTimeDurationval divide_dayTimeDuration_by_dayTimeDuration : xs_dayTimeDuration ->
xs_dayTimeDuration -> Decimal._decimalExtraction functions on dates, times, and durations
val years_from_duration : xs_yearMonthDuration -> intval months_from_duration : xs_yearMonthDuration -> intval days_from_duration : xs_dayTimeDuration -> intval hours_from_duration : xs_dayTimeDuration -> intval minutes_from_duration : xs_dayTimeDuration -> intval seconds_from_duration : xs_dayTimeDuration -> Decimal._decimalval hours_from_time : xs_time -> intval minutes_from_time : xs_time -> intval seconds_from_time : xs_time -> Decimal._decimalval timezone_from_time : xs_time -> xs_dayTimeDurationval opt_timezone_from_time : xs_time -> xs_dayTimeDuration option
val year_from_date : xs_date -> intval month_from_date : xs_date -> intval day_from_date : xs_date -> intval timezone_from_date : xs_date -> xs_dayTimeDurationval opt_timezone_from_date : xs_date -> xs_dayTimeDuration option
val year_from_dateTime : xs_dateTime -> intval month_from_dateTime : xs_dateTime -> intval day_from_dateTime : xs_dateTime -> intval hours_from_dateTime : xs_dateTime -> intval minutes_from_dateTime : xs_dateTime -> intval seconds_from_dateTime : xs_dateTime -> Decimal._decimalval timezone_from_dateTime : xs_dateTime -> xs_dayTimeDurationval opt_timezone_from_dateTime : xs_dateTime -> xs_dayTimeDuration option
val date_from_dateTime : xs_dateTime -> xs_dateval time_from_dateTime : xs_dateTime -> xs_timeContext functions
val current_dateTime : unit -> xs_dateTimeGives the current dateTime based upon the Unix system time set by the user for the operating system
val local_timezone : unit -> xs_dayTimeDurationGives the local timezone based upon the Unix system timezone set by the user.
val default_dateTime : unit -> xs_dateTimeGives the dateTime corresponding the January 1st, 1970 at midnight. This is put in place to correspond to the Unix system calls which judge time based upon time elapsed since this default time
val default_UTC : unit -> xs_dayTimeDurationGives the dayTimeDuration corresponding to 0 days, 0 hours, 0 minutes, 0 seconds to represent the timezone offset at UTC
val adjust_time_to_timezone : xs_time -> xs_dayTimeDuration option -> xs_timeAdjusts the given time to the given timezone, or appends the timezone if there is no timezone attached to the given time
val adjust_date_to_timezone : xs_date -> xs_dayTimeDuration option -> xs_dateAdjusts the given date to the given timezone, or appends the timezone if there is no timezone attached to the given date
val adjust_dateTime_to_timezone : xs_dateTime ->
xs_dayTimeDuration option -> xs_dateTimeAdjusts the given dateTime to the given timezone, or appends the timezone if there is no timezone attached to the given dateTime
val yearMonthDuration_of_duration : xs_duration -> xs_yearMonthDuration
val dayTimeDuration_of_duration : xs_duration -> xs_dayTimeDuration
val duration_of_yearMonthDuration : xs_yearMonthDuration -> xs_duration
val duration_of_dayTimeDuration : xs_dayTimeDuration -> xs_duration
val negate_time : xs_time -> xs_time
val negate_date : xs_date -> xs_date
val negate_dateTime : xs_dateTime -> xs_dateTime
val negate_gYear : xs_gYear -> xs_gYear
val negate_gYearMonth : xs_gYearMonth -> xs_gYearMonth