<!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>Data.Time.Calendar.OrdinalDate</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_Data-Time-Calendar-OrdinalDate.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">time-1.4: A time library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.Time.Calendar.OrdinalDate</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>ISO 8601 Ordinal Date format </p></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:toOrdinalDate">toOrdinalDate</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> (<a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:fromOrdinalDate">fromOrdinalDate</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-Calendar.html#t:Day">Day</a></li><li class="src short"><a href="#v:fromOrdinalDateValid">fromOrdinalDateValid</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-Calendar.html#t:Day">Day</a></li><li class="src short"><a href="#v:showOrdinalDate">showOrdinalDate</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:isLeapYear">isLeapYear</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:mondayStartWeek">mondayStartWeek</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:sundayStartWeek">sundayStartWeek</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:fromMondayStartWeek">fromMondayStartWeek</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-Calendar.html#t:Day">Day</a></li><li class="src short"><a href="#v:fromMondayStartWeekValid">fromMondayStartWeekValid</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-Calendar.html#t:Day">Day</a></li><li class="src short"><a href="#v:fromSundayStartWeek">fromSundayStartWeek</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-Calendar.html#t:Day">Day</a></li><li class="src short"><a href="#v:fromSundayStartWeekValid">fromSundayStartWeekValid</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-Calendar.html#t:Day">Day</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:toOrdinalDate" class="def">toOrdinalDate</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> (<a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</p><div class="doc"><p>convert to ISO 8601 Ordinal Date format. First element of result is year (proleptic Gregoran calendar), second is the day of the year, with 1 for Jan 1, and 365 (or 366 in leap years) for Dec 31. </p></div></div><div class="top"><p class="src"><a name="v:fromOrdinalDate" class="def">fromOrdinalDate</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-Calendar.html#t:Day">Day</a></p><div class="doc"><p>convert from ISO 8601 Ordinal Date format. Invalid day numbers will be clipped to the correct range (1 to 365 or 366). </p></div></div><div class="top"><p class="src"><a name="v:fromOrdinalDateValid" class="def">fromOrdinalDateValid</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-Calendar.html#t:Day">Day</a></p><div class="doc"><p>convert from ISO 8601 Ordinal Date format. Invalid day numbers return Nothing </p></div></div><div class="top"><p class="src"><a name="v:showOrdinalDate" class="def">showOrdinalDate</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>show in ISO 8601 Ordinal Date format (yyyy-ddd) </p></div></div><div class="top"><p class="src"><a name="v:isLeapYear" class="def">isLeapYear</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a> -> <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></p><div class="doc"><p>Is this year a leap year according to the proleptic Gregorian calendar? </p></div></div><div class="top"><p class="src"><a name="v:mondayStartWeek" class="def">mondayStartWeek</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</p><div class="doc"><p>Get the number of the Monday-starting week in the year and the day of the week. The first Monday is the first day of week 1, any earlier days in the year are week 0 (as "%W" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). Monday is 1, Sunday is 7 (as "%u" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></div></div><div class="top"><p class="src"><a name="v:sundayStartWeek" class="def">sundayStartWeek</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a> -> (<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>, <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>)</p><div class="doc"><p>Get the number of the Sunday-starting week in the year and the day of the week. The first Sunday is the first day of week 1, any earlier days in the year are week 0 (as "%U" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). Sunday is 0, Saturday is 6 (as "%w" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></div></div><div class="top"><p class="src"><a name="v:fromMondayStartWeek" class="def">fromMondayStartWeek</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Year. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Monday-starting week number. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Day of week. Monday is 1, Sunday is 7 (as "%u" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></td></tr><tr><td class="src">-> <a href="Data-Time-Calendar.html#t:Day">Day</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>The inverse of <code><a href="Data-Time-Calendar-OrdinalDate.html#v:mondayStartWeek">mondayStartWeek</a></code>. Get a <code><a href="Data-Time-Calendar.html#t:Day">Day</a></code> given the year, the number of the Monday-starting week, and the day of the week. The first Monday is the first day of week 1, any earlier days in the year are week 0 (as "%W" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></div></div><div class="top"><p class="src"><a name="v:fromMondayStartWeekValid" class="def">fromMondayStartWeekValid</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Year. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Monday-starting week number. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Day of week. Monday is 1, Sunday is 7 (as "%u" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-Calendar.html#t:Day">Day</a></td><td class="doc empty"> </td></tr></table></div></div><div class="top"><p class="src"><a name="v:fromSundayStartWeek" class="def">fromSundayStartWeek</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Year. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Sunday-starting week number. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Day of week Sunday is 0, Saturday is 6 (as "%w" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></td></tr><tr><td class="src">-> <a href="Data-Time-Calendar.html#t:Day">Day</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>The inverse of <code><a href="Data-Time-Calendar-OrdinalDate.html#v:sundayStartWeek">sundayStartWeek</a></code>. Get a <code><a href="Data-Time-Calendar.html#t:Day">Day</a></code> given the year and the number of the day of a Sunday-starting week. The first Sunday is the first day of week 1, any earlier days in the year are week 0 (as "%U" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></div></div><div class="top"><p class="src"><a name="v:fromSundayStartWeekValid" class="def">fromSundayStartWeekValid</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Year. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Monday-starting week number. </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Day of week. Monday is 1, Sunday is 7 (as "%u" in <code><a href="Data-Time-Format.html#v:formatTime">formatTime</a></code>). </p></td></tr><tr><td class="src">-> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-Calendar.html#t:Day">Day</a></td><td class="doc empty"> </td></tr></table></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>