Overview  Index  Help 
Standard ML Basis Library

Date


structure Date : DATE =
struct
  type tm = int * int * int * int * int * int * int * int * int
  datatype weekday = Mon | Tue | Wed | Thu | Fri | Sat | Sun
  datatype month =
           Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
  datatype date =
           DATE of
           {
             year : int,
             month : month,
             day : int,
             hour : int,
             minute : int,
             second : int,
             offset : Time.time option,
             wday : weekday,
             yday : int,
             isDst : bool option
           }
  exception Date
  val baseYear
  val dayTbl
  val monthTbl
  val dayToInt
  val monthToInt
  val wrap
  val ascTime
  val localTime'
  val gmTime'
  val mkTime'
  val strfTime
  val localTime
  val gmTime
  val mkTime
  val year : date -> int
  val month : date -> month
  val day : date -> int
  val hour : date -> int
  val minute : date -> int
  val second : date -> int
  val weekDay : date -> weekday
  val yearDay : date -> int
  val isDst : date -> bool option
  val offset : date -> Time.time option
  val withDst
  val dstOf
  val localOffset'
  val localOffset : unit -> Time.time
  val toAbsolute
  val fromAbsolute
  val wday
  val yday
  val canonicalizeDate
  val toTM
  val fromTM
  val fromTimeLocal : Time.time -> date
  val fromTimeUniv : Time.time -> date
  val fromTimeOffset
  val day_seconds
  val hday_seconds
  val canonicalOffset
  val toTime : date -> Time.time
  val date
      : {
          year : int,
          month : month,
          day : int,
          hour : int,
          minute : int,
          second : int,
          offset : Time.time option
        } ->
          date
  val toString : date -> string
  val fmt : string -> date -> string
  val scan : (char, 'a) StringCvt.reader -> (date, 'a) StringCvt.reader
  val fromString : string -> date option
  val compare : date * date -> order
end

 
Type detail

tm

type tm = int * int * int * int * int * int * int * int * int

 
Datatype detail

weekday

datatype weekday = Mon | Tue | Wed | Thu | Fri | Sat | Sun


month

datatype month =
         Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec


date

datatype date =
         DATE of
         {
           year : int,
           month : month,
           day : int,
           hour : int,
           minute : int,
           second : int,
           offset : Time.time option,
           wday : weekday,
           yday : int,
           isDst : bool option
         }

 
DataConstructor detail

Mon

constructor Mon : weekday


Tue

constructor Tue : weekday


Wed

constructor Wed : weekday


Thu

constructor Thu : weekday


Fri

constructor Fri : weekday


Sat

constructor Sat : weekday


Sun

constructor Sun : weekday


Jan

constructor Jan : month


Feb

constructor Feb : month


Mar

constructor Mar : month


Apr

constructor Apr : month


May

constructor May : month


Jun

constructor Jun : month


Jul

constructor Jul : month


Aug

constructor Aug : month


Sep

constructor Sep : month


Oct

constructor Oct : month


Nov

constructor Nov : month


Dec

constructor Dec : month


DATE

constructor DATE
            : {
                year : int,
                month : month,
                day : int,
                hour : int,
                minute : int,
                second : int,
                offset : Time.time option,
                wday : weekday,
                yday : int,
                isDst : bool option
              } ->
                date

 
Value detail

baseYear

val baseYear


dayTbl

val dayTbl


monthTbl

val monthTbl


dayToInt

val dayToInt


monthToInt

val monthToInt


wrap

val wrap


ascTime

val ascTime


localTime'

val localTime'


gmTime'

val gmTime'


mkTime'

val mkTime'


strfTime

val strfTime


localTime

val localTime


gmTime

val gmTime


mkTime

val mkTime


year

val year : date -> int


month

val month : date -> month


day

val day : date -> int


hour

val hour : date -> int


minute

val minute : date -> int


second

val second : date -> int


weekDay

val weekDay : date -> weekday


yearDay

val yearDay : date -> int


isDst

val isDst : date -> bool option


offset

val offset : date -> Time.time option


withDst

val withDst


dstOf

val dstOf


localOffset'

val localOffset'


localOffset

val localOffset : unit -> Time.time


toAbsolute

val toAbsolute


fromAbsolute

val fromAbsolute


wday

val wday


yday

val yday


canonicalizeDate

val canonicalizeDate


toTM

val toTM


fromTM

val fromTM


fromTimeLocal

val fromTimeLocal : Time.time -> date


fromTimeUniv

val fromTimeUniv : Time.time -> date


fromTimeOffset

val fromTimeOffset


day_seconds

val day_seconds


hday_seconds

val hday_seconds


canonicalOffset

val canonicalOffset


toTime

val toTime : date -> Time.time


date

val date
    : {
        year : int,
        month : month,
        day : int,
        hour : int,
        minute : int,
        second : int,
        offset : Time.time option
      } ->
        date


toString

val toString : date -> string


fmt

val fmt : string -> date -> string


scan

val scan : (char, 'a) StringCvt.reader -> (date, 'a) StringCvt.reader


fromString

val fromString : string -> date option


compare

val compare : date * date -> order

 
Exception detail

Date

exception Date


Overview  Index  Help 
Standard ML Basis Library

This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.

Copyright © 2003 AT&T and Lucent Technologies. All rights reserved.

Permission is granted for internet users to make one paper copy for their own personal use. Further hardcopy reproduction is strictly prohibited. Permission to distribute the HTML document electronically on any medium other than the internet must be requested from the copyright holders by contacting the editors. Printed versions of the SML Basis Manual are available from Cambridge University Press. To order, please visit www.cup.org (North America) or www.cup.cam.ac.uk (outside North America).