<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >IsoDate</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock-util.js" TYPE="text/javascript" ></SCRIPT ><SCRIPT TYPE="text/javascript" >window.onload = function () {setSynopsis("mini_IsoDate.html")};</SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >darcs-2.4.4: a distributed, interactive, smart revision control system</TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >IsoDate</FONT ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetIsoDateTime" >getIsoDateTime</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/System-IO.html#t%3AIO" >IO</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AreadLocalDate" >readLocalDate</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AreadUTCDate" >readUTCDate</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AparseDate" >parseDate</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Either.html#t%3AEither" >Either</A > <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Error.html#t%3AParseError" >ParseError</A > <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetLocalTz" >getLocalTz</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/System-IO.html#t%3AIO" >IO</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AenglishDateTime" >englishDateTime</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AenglishInterval" >englishInterval</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a <A HREF="IsoDate.html#t%3ATimeInterval" >TimeInterval</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AenglishLast" >englishLast</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a (<A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >, <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >)</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aiso8601_interval" >iso8601_interval</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Either.html#t%3AEither" >Either</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A > (<A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A >, <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A >))</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3Aiso8601_duration" >iso8601_duration</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcleanLocalDate" >cleanLocalDate</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AresetCalendar" >resetCalendar</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A HREF="#t%3AMCalendarTime" >MCalendarTime</A > = <A HREF="#v%3AMCalendarTime" >MCalendarTime</A > {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctYear" >mctYear</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctMonth" >mctMonth</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3AMonth" >Month</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctDay" >mctDay</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctHour" >mctHour</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctMin" >mctMin</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctSec" >mctSec</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctPicosec" >mctPicosec</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Prelude.html#t%3AInteger" >Integer</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctWDay" >mctWDay</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ADay" >Day</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctYDay" >mctYDay</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctTZName" >mctTZName</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctTZ" >mctTZ</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctIsDST" >mctIsDST</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Bool.html#t%3ABool" >Bool</A ></TD ></TR ><TR ><TD CLASS="recfield" ><A HREF="#v%3AmctWeek" >mctWeek</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Bool.html#t%3ABool" >Bool</A ></TD ></TR ></TABLE >}</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AsubtractFromMCal" >subtractFromMCal</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AaddToMCal" >addToMCal</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AtoMCalendarTime" >toMCalendarTime</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AunsafeToCalendarTime" >unsafeToCalendarTime</A > :: <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AunsetTime" >unsetTime</A > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A HREF="#t%3ATimeInterval" >TimeInterval</A > = (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >)</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Documentation</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getIsoDateTime" ><A NAME="v%3AgetIsoDateTime" ></A ></A ><B >getIsoDateTime</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/System-IO.html#t%3AIO" >IO</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A ></TD ></TR ><TR ><TD CLASS="doc" >The current time in the format returned by <TT >showIsoDateTime</TT > </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:readLocalDate" ><A NAME="v%3AreadLocalDate" ></A ></A ><B >readLocalDate</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Read/interpret a date string, assuming local timezone if not specified in the string </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:readUTCDate" ><A NAME="v%3AreadUTCDate" ></A ></A ><B >readUTCDate</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Read/interpret a date string, assuming UTC if timezone is not specified in the string (see <TT >readDate</TT >) Warning! This errors out if we fail to interpret the date </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:parseDate" ><A NAME="v%3AparseDate" ></A ></A ><B >parseDate</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Either.html#t%3AEither" >Either</A > <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Error.html#t%3AParseError" >ParseError</A > <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Parse a date string, assuming a default timezone if the date string does not specify one. The date formats understood are those of <TT >showIsoDateTime</TT > and <TT >date_time</TT > </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:getLocalTz" ><A NAME="v%3AgetLocalTz" ></A ></A ><B >getLocalTz</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/System-IO.html#t%3AIO" >IO</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ></TR ><TR ><TD CLASS="doc" >Return the local timezone offset from UTC in seconds </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:englishDateTime" ><A NAME="v%3AenglishDateTime" ></A ></A ><B >englishDateTime</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >In English, either a date followed by a time, or vice-versa, e.g, </P ><UL ><LI > yesterday at noon </LI ><LI > yesterday tea time </LI ><LI > 12:00 yesterday </LI ></UL ><P >See <TT >englishDate</TT > and <TT >englishTime</TT > Uses its first argument as <A HREF="now.html" >now</A >, i.e. the time relative to which <A HREF="yesterday.html" >yesterday</A >, <A HREF="today.html" >today</A > etc are to be interpreted </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:englishInterval" ><A NAME="v%3AenglishInterval" ></A ></A ><B >englishInterval</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a <A HREF="IsoDate.html#t%3ATimeInterval" >TimeInterval</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >English expressions for intervals of time, </P ><UL ><LI > before tea time (i.e. from the beginning of time) </LI ><LI > after 14:00 last month (i.e. till now) </LI ><LI > between last year and last month </LI ><LI > in the last three months (i.e. from then till now) </LI ><LI > 4 months ago (i.e. till now; see <TT >englishAgo</TT >) </LI ></UL ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:englishLast" ><A NAME="v%3AenglishLast" ></A ></A ><B >englishLast</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a (<A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >, <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >)</TD ></TR ><TR ><TD CLASS="doc" >Durations in English that begin with the word "last", E.g. "last 4 months" is treated as the duration between 4 months ago and now </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:iso8601_interval" ><A NAME="v%3Aiso8601_interval" ></A ></A ><B >iso8601_interval</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Either.html#t%3AEither" >Either</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A > (<A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A >, <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A >))</TD ></TR ><TR ><TD CLASS="doc" ><P >Intervals in ISO 8601, e.g., </P ><UL ><LI > 2008-09/2012-08-17T16:30 </LI ><LI > 2008-09/P2Y11MT16H30M </LI ><LI > P2Y11MT16H30M/2012-08-17T16:30 </LI ></UL ><P >See <TT ><A HREF="IsoDate.html#v%3Aiso8601_duration" >iso8601_duration</A ></TT > </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:iso8601_duration" ><A NAME="v%3Aiso8601_duration" ></A ></A ><B >iso8601_duration</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/parsec-2.1.0.1/Text-ParserCombinators-Parsec-Char.html#t%3ACharParser" >CharParser</A > a <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A ></TD ></TR ><TR ><TD CLASS="doc" ><P >Durations in ISO 8601, e.g., </P ><UL ><LI > P4Y (four years) </LI ><LI > P5M (five months) </LI ><LI > P4Y5M (four years and five months) </LI ><LI > P4YT3H6S (four years, three hours and six seconds) </LI ></UL ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:cleanLocalDate" ><A NAME="v%3AcleanLocalDate" ></A ></A ><B >cleanLocalDate</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A ></TD ></TR ><TR ><TD CLASS="doc" >Convert a date string into ISO 8601 format (yyyymmdd variant) assuming local timezone if not specified in the string Warning! This errors out if we fail to interpret the date </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:resetCalendar" ><A NAME="v%3AresetCalendar" ></A ></A ><B >resetCalendar</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Set a calendar to UTC time any eliminate any inconsistencies within (for example, where the weekday is given as <TT >Thursday</TT >, but this does not match what the numerical date would lead one to expect) </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >data</SPAN > <A NAME="t:MCalendarTime" ><A NAME="t%3AMCalendarTime" ></A ></A ><B >MCalendarTime</B > </TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="ndoc" >An MCalenderTime is an underspecified <TT ><A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TT > It is used for parsing dates. For example, if you want to parse the date '4 January', it may be useful to underspecify the year by setting it to <TT ><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#v%3ANothing" >Nothing</A ></TT >. This uses almost the same fields as <TT ><A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TT >, a notable exception being that we introduce <TT ><A HREF="IsoDate.html#v%3AmctWeek" >mctWeek</A ></TT > to indicate if a weekday was specified or not </TD ></TR ><TR ><TD CLASS="section4" >Constructors</TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:MCalendarTime" ><A NAME="v%3AMCalendarTime" ></A ></A ><B >MCalendarTime</B ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="body" COLSPAN="2" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="arg" ><A NAME="v:mctYear" ><A NAME="v%3AmctYear" ></A ></A ><B >mctYear</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctMonth" ><A NAME="v%3AmctMonth" ></A ></A ><B >mctMonth</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3AMonth" >Month</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctDay" ><A NAME="v%3AmctDay" ></A ></A ><B >mctDay</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctHour" ><A NAME="v%3AmctHour" ></A ></A ><B >mctHour</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctMin" ><A NAME="v%3AmctMin" ></A ></A ><B >mctMin</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctSec" ><A NAME="v%3AmctSec" ></A ></A ><B >mctSec</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctPicosec" ><A NAME="v%3AmctPicosec" ></A ></A ><B >mctPicosec</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Prelude.html#t%3AInteger" >Integer</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctWDay" ><A NAME="v%3AmctWDay" ></A ></A ><B >mctWDay</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ADay" >Day</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctYDay" ><A NAME="v%3AmctYDay" ></A ></A ><B >mctYDay</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctTZName" ><A NAME="v%3AmctTZName" ></A ></A ><B >mctTZName</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Char.html#t%3AString" >String</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctTZ" ><A NAME="v%3AmctTZ" ></A ></A ><B >mctTZ</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Int.html#t%3AInt" >Int</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctIsDST" ><A NAME="v%3AmctIsDST" ></A ></A ><B >mctIsDST</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Bool.html#t%3ABool" >Bool</A ></TD ><TD CLASS="rdoc" ></TD ></TR ><TR ><TD CLASS="arg" ><A NAME="v:mctWeek" ><A NAME="v%3AmctWeek" ></A ></A ><B >mctWeek</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Bool.html#t%3ABool" >Bool</A ></TD ><TD CLASS="rdoc" ></TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="section4" ><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:MCalendarTime')" ALT="show/hide" > Instances</TD ></TR ><TR ><TD CLASS="body" ><DIV ID="i:MCalendarTime" STYLE="display:block;" ><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Text-Show.html#t%3AShow" >Show</A > <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:subtractFromMCal" ><A NAME="v%3AsubtractFromMCal" ></A ></A ><B >subtractFromMCal</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:addToMCal" ><A NAME="v%3AaddToMCal" ></A ></A ><B >addToMCal</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ATimeDiff" >TimeDiff</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:toMCalendarTime" ><A NAME="v%3AtoMCalendarTime" ></A ></A ><B >toMCalendarTime</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Trivially convert a <TT ><A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TT > to a fully specified <TT ><A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TT > (note that this sets the <TT ><A HREF="IsoDate.html#v%3AmctWeek" >mctWeek</A ></TT > flag to <TT >False</TT > </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:unsafeToCalendarTime" ><A NAME="v%3AunsafeToCalendarTime" ></A ></A ><B >unsafeToCalendarTime</B > :: <A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Returns the first <TT ><A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TT > that falls within a <TT ><A HREF="IsoDate.html#t%3AMCalendarTime" >MCalendarTime</A ></TT > This is only unsafe in the sense that it plugs in default values for fields that have not been set, e.g. <TT >January</TT > for the month or <TT >0</TT > for the seconds field. Maybe we should rename it something happier. See also <TT ><A HREF="IsoDate.html#v%3AresetCalendar" >resetCalendar</A ></TT > </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v:unsetTime" ><A NAME="v%3AunsetTime" ></A ></A ><B >unsetTime</B > :: <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A > -> <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TD ></TR ><TR ><TD CLASS="doc" >Zero the time fields of a <TT ><A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A ></TT > </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><SPAN CLASS="keyword" >type</SPAN > <A NAME="t:TimeInterval" ><A NAME="t%3ATimeInterval" ></A ></A ><B >TimeInterval</B > = (<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.0/Data-Maybe.html#t%3AMaybe" >Maybe</A > <A HREF="/usr/share/doc/ghc/html/libraries/old-time-1.0.0.3/System-Time.html#t%3ACalendarTime" >CalendarTime</A >)</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 2.6.0</TD ></TR ></TABLE ></BODY ></HTML >