<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>IsoDate</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_IsoDate.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/IsoDate.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">darcs-2.8.3: a distributed, interactive, smart revision control system</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>darcs-devel@darcs.net</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">IsoDate</p></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:getIsoDateTime">getIsoDateTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:readLocalDate">readLocalDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></li><li class="src short"><a href="#v:readUTCDate">readUTCDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></li><li class="src short"><a href="#v:parseDate">parseDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Either.html#t:Either">Either</a> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-Parsec-Error.html#t:ParseError">ParseError</a> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a></li><li class="src short"><a href="#v:getLocalTz">getLocalTz</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:englishDateTime">englishDateTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></li><li class="src short"><a href="#v:englishInterval">englishInterval</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a <a href="IsoDate.html#t:TimeInterval">TimeInterval</a></li><li class="src short"><a href="#v:englishLast">englishLast</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a (<a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>, <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>)</li><li class="src short"><a href="#v:iso8601Interval">iso8601Interval</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Either.html#t:Either">Either</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a> (<a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a>, <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a>))</li><li class="src short"><a href="#v:iso8601Duration">iso8601Duration</a> :: <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a></li><li class="src short"><a href="#v:cleanLocalDate">cleanLocalDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:resetCalendar">resetCalendar</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:MCalendarTime">MCalendarTime</a> = <a href="#v:MCalendarTime">MCalendarTime</a> {<ul class="subs"><li><a href="#v:mctYear">mctYear</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:mctMonth">mctMonth</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:Month">Month</a></li><li><a href="#v:mctDay">mctDay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:mctHour">mctHour</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:mctMin">mctMin</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:mctSec">mctSec</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:mctPicosec">mctPicosec</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></li><li><a href="#v:mctWDay">mctWDay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:Day">Day</a></li><li><a href="#v:mctYDay">mctYDay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:mctTZName">mctTZName</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></li><li><a href="#v:mctTZ">mctTZ</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:mctIsDST">mctIsDST</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:mctWeek">mctWeek</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><a href="#v:subtractFromMCal">subtractFromMCal</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a></li><li class="src short"><a href="#v:addToMCal">addToMCal</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a></li><li class="src short"><a href="#v:toMCalendarTime">toMCalendarTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a></li><li class="src short"><a href="#v:unsafeToCalendarTime">unsafeToCalendarTime</a> :: <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></li><li class="src short"><a href="#v:unsetTime">unsetTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:TimeInterval">TimeInterval</a> = (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>)</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:getIsoDateTime" class="def">getIsoDateTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a><a href="src/IsoDate.html#getIsoDateTime" class="link">Source</a></p><div class="doc"><p>The current time in the format returned by <code>showIsoDateTime</code> </p></div></div><div class="top"><p class="src"><a name="v:readLocalDate" class="def">readLocalDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a><a href="src/IsoDate.html#readLocalDate" class="link">Source</a></p><div class="doc"><p>Read/interpret a date string, assuming local timezone if not specified in the string </p></div></div><div class="top"><p class="src"><a name="v:readUTCDate" class="def">readUTCDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a><a href="src/IsoDate.html#readUTCDate" class="link">Source</a></p><div class="doc"><p>Read/interpret a date string, assuming UTC if timezone is not specified in the string (see <code>readDate</code>) Warning! This errors out if we fail to interpret the date </p></div></div><div class="top"><p class="src"><a name="v:parseDate" class="def">parseDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Either.html#t:Either">Either</a> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-Parsec-Error.html#t:ParseError">ParseError</a> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a><a href="src/IsoDate.html#parseDate" class="link">Source</a></p><div class="doc"><p>Parse a date string, assuming a default timezone if the date string does not specify one. The date formats understood are those of <code>showIsoDateTime</code> and <code>dateTime</code> </p></div></div><div class="top"><p class="src"><a name="v:getLocalTz" class="def">getLocalTz</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a><a href="src/IsoDate.html#getLocalTz" class="link">Source</a></p><div class="doc"><p>Return the local timezone offset from UTC in seconds </p></div></div><div class="top"><p class="src"><a name="v:englishDateTime" class="def">englishDateTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a><a href="src/IsoDate.html#englishDateTime" class="link">Source</a></p><div 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 <code>englishDate</code> and <code>englishTime</code> 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></div></div><div class="top"><p class="src"><a name="v:englishInterval" class="def">englishInterval</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a <a href="IsoDate.html#t:TimeInterval">TimeInterval</a><a href="src/IsoDate.html#englishInterval" class="link">Source</a></p><div 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 <code>englishAgo</code>) </li></ul></div></div><div class="top"><p class="src"><a name="v:englishLast" class="def">englishLast</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a (<a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>, <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>)<a href="src/IsoDate.html#englishLast" class="link">Source</a></p><div class="doc"><p>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 </p></div></div><div class="top"><p class="src"><a name="v:iso8601Interval" class="def">iso8601Interval</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Either.html#t:Either">Either</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a> (<a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a>, <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a>))<a href="src/IsoDate.html#iso8601Interval" class="link">Source</a></p><div 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 <code><a href="IsoDate.html#v:iso8601Duration">iso8601Duration</a></code> </p></div></div><div class="top"><p class="src"><a name="v:iso8601Duration" class="def">iso8601Duration</a> :: <a href="/usr/share/doc/ghc/html/libraries/parsec-3.1.2/Text-ParserCombinators-Parsec-Char.html#t:CharParser">CharParser</a> a <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a><a href="src/IsoDate.html#iso8601Duration" class="link">Source</a></p><div 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></div></div><div class="top"><p class="src"><a name="v:cleanLocalDate" class="def">cleanLocalDate</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a><a href="src/IsoDate.html#cleanLocalDate" class="link">Source</a></p><div class="doc"><p>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 </p></div></div><div class="top"><p class="src"><a name="v:resetCalendar" class="def">resetCalendar</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a><a href="src/IsoDate.html#resetCalendar" class="link">Source</a></p><div class="doc"><p>Set a calendar to UTC time any eliminate any inconsistencies within (for example, where the weekday is given as <code>Thursday</code>, but this does not match what the numerical date would lead one to expect) </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:MCalendarTime" class="def">MCalendarTime</a> <a href="src/IsoDate.html#MCalendarTime" class="link">Source</a></p><div class="doc"><p>An <code>MCalenderTime</code> is an underspecified <code><a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></code> 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 <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>. This uses almost the same fields as <code><a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></code>, a notable exception being that we introduce <code><a href="IsoDate.html#v:mctWeek">mctWeek</a></code> to indicate if a weekday was specified or not </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:MCalendarTime" class="def">MCalendarTime</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:mctYear" class="def">mctYear</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctMonth" class="def">mctMonth</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:Month">Month</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctDay" class="def">mctDay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctHour" class="def">mctHour</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctMin" class="def">mctMin</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctSec" class="def">mctSec</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctPicosec" class="def">mctPicosec</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Integer">Integer</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctWDay" class="def">mctWDay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:Day">Day</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctYDay" class="def">mctYDay</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctTZName" class="def">mctTZName</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctTZ" class="def">mctTZ</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctIsDST" class="def">mctIsDST</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:mctWeek" class="def">mctWeek</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:MCalendarTime" class="caption collapser" onclick="toggleSection('i:MCalendarTime')">Instances</p><div id="section.i:MCalendarTime" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:subtractFromMCal" class="def">subtractFromMCal</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a><a href="src/IsoDate.html#subtractFromMCal" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:addToMCal" class="def">addToMCal</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:TimeDiff">TimeDiff</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a><a href="src/IsoDate.html#addToMCal" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toMCalendarTime" class="def">toMCalendarTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a><a href="src/IsoDate.html#toMCalendarTime" class="link">Source</a></p><div class="doc"><p>Trivially convert a <code><a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></code> to a fully specified <code><a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a></code> (note that this sets the <code><a href="IsoDate.html#v:mctWeek">mctWeek</a></code> flag to <code>False</code> </p></div></div><div class="top"><p class="src"><a name="v:unsafeToCalendarTime" class="def">unsafeToCalendarTime</a> :: <a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a><a href="src/IsoDate.html#unsafeToCalendarTime" class="link">Source</a></p><div class="doc"><p>Returns the first <code><a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></code> that falls within a <code><a href="IsoDate.html#t:MCalendarTime">MCalendarTime</a></code> This is only unsafe in the sense that it plugs in default values for fields that have not been set, e.g. <code>January</code> for the month or <code>0</code> for the seconds field. Maybe we should rename it something happier. See also <code><a href="IsoDate.html#v:resetCalendar">resetCalendar</a></code> </p></div></div><div class="top"><p class="src"><a name="v:unsetTime" class="def">unsetTime</a> :: <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a> -> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a><a href="src/IsoDate.html#unsetTime" class="link">Source</a></p><div class="doc"><p>Zero the time fields of a <code><a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a></code> </p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:TimeInterval" class="def">TimeInterval</a> = (<a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="/usr/share/doc/ghc/html/libraries/old-time-1.1.0.0/System-Time.html#t:CalendarTime">CalendarTime</a>)<a href="src/IsoDate.html#TimeInterval" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>