!YMk      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijNoneM;0$ herf-time8Simple representation of a time interval of a picosecond herf-time4Simple representation of a time interval of a second herf-time4Simple representation of a time interval of a minute herf-time2Simple representation of a time interval of a hour herf-time1Simple representation of a time interval of a day herf-time2Simple representation of a time interval of a week herf-time3Simple representation of a time interval of a month herf-time2Simple representation of a time interval of a year herf-timelThis provides the unified interface to herfed times. All instances of this class should obey the rule that if some interval you are adding is equivalent in another HerfAdd time then there should be no difference between adding that many to a HerfedTime i.e. (HerfMin 1) == (HerfSec 60) (herf $ add someTime (HerfMin 1) ) == (herf $ add someTime (HerfMin 60))  herf-timeiThis defines the time language of herf the important rule here is path independence (unherf $ (herf a)   i ) == (a   i)RThis ensures that regardless of how you get to a time the result will be the sameSomething to notice is that rule still allows for lossy Time Stamps. The loss just has to be captured uniformally in the transforms and the interval arithmetic herf-time6come back from the UTCHerfTime universal represenation herf-timeThe # is necessary to have an interface lifted5 so that all the functions can be abstracted over it herf-time^Below are the classes that make up the core of the HerfTime Library. Starting with the type B which is the encoding that most other time stamps pass through herf-time"Add Intervals of different amountsGdate 2016 01 01 `add` hour 3 `add` week 16 `add` month 3 :: UTCHerfTime#UTCHerfTime 2016-07-22 03:00:00 UTC&Represent Time in a few different waysZdateTime 2016 01 01 01 23 01 `add` (hour 3) `add` (week 16) `add` (month 3) :: UTCHerfTime#UTCHerfTime 2016-07-22 04:23:01 UTCadateTimePico 2016 01 01 01 23 01 01 `add` (hour 3) `add` (week 16) `add` (month 3) :: UTCHerfTime0UTCHerfTime 2016-07-22 04:23:01.000000000001 UTCUse negative signs to subtractPdate 2016 01 01 `add` hour (-3) `add` week (-16) `add` month (-3) :: UTCHerfTime#UTCHerfTime 2015-06-10 21:00:00 UTC%Interface functions following Kerf y herf-timem herf-timew herf-timed herf-timeh  herf-timei! herf-times" herf-timep# herf-time)Display herf times in a pre formatted wayk herf-timedate 1 1 1 :: UTCHerfTime#UTCHerfTime 0001-01-01 00:00:00 UTCl herf-timeeTime only, you can't just add a diff time to a date so we get a diff time back >>> time 1 1 1 3661s$ herf-time$ is not part of a typeclass, just more sugar to make dealing with time conversion If both classes are defined on the same type, the classes should round trip. e.g. (date y m d ):: UTCTime in d == (reherf d))% herf-timegetYear someUtcTime -> 2016y& herf-timegetMonth someUtcTime -> 10m' herf-timegetDay someUtcTime -> 31d( herf-timeGet all date parts together) herf-timegetHour someUtcTime -> 1h* herf-timegetMin someUtcTime -> 37i+ herf-timegetSeconds someUtcTime -> 1s, herf-time getPicoseconds somUTCTime -> 1ps- herf-time;UTCTime is the underlying and most important HerfTime thing. herf-time<NominalHerf time will obey the laws of HerfedTime by default1 herf-timeOGet Times in any viable format (UTC for example) >>> unherf $ date 2016 01 01   hour 3   week 16  . month 3 :: UTCTime 2016-07-22 03:00:00 UTCmnopqrstuvwxyz{|}~  !"#$%&'()*+,-#$%&'()*+,   !"*LocalTime interpreter for HerfedTime ClassPlow Technologies LLC MIT License Scott MurphyNone.HMXK"_ herf-timeEZoned Time always has an extra parameter to convert into a fixed time` herf-timeAdd Time Zone is different than converting It takes a UTCTime and just slaps on the timezone in the ZonedTime field This is exactly what you want when you are first creating a time and almost never what you want after!a herf-time4Helper function to convert UTCTime to HerfZoned timeb herf-time*Getting back from HerfZonedTime to UTCTimec herf-time1Don't want an orphan on ZonedTime so I made herfzd herf-timelike $E but for zoned time (which doesn't have a direct HerfedTime instance)e herf-time:set -XDataKindsX(reherf $ ( dateTime 2016 01 01 01 01 01 :: HerfZonedTime "CST")) :: HerfZonedTime "PST"2015-12-31T23:01:01:PSTmnopqrstuvwxyz{|}~  !"#$%&'()*+,_`abcd_ab`cd      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrpqspqtpqupvwpvxpvypvzpv{pv|pv}pv~pvppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp&herf-time-0.3.1-AC5GlHxG2cLAvxYzacbk4fHerfTimeHerfTime.ZonedTimeHerfPicoHerfSecHerfMinHerfHourHerfDayHerfWeek HerfMonthHerfYearHerfAddadd HerfedTimeaddYearaddMonthaddWeekaddDayaddHour addMinute addSecond addPicoseconddatedateTime dateTimePicoFromUTCHerfTimeunherf ToUTCHerfTimeherf UTCHerfTimeyearmonthweekdayhourminutesecondpicoherfShowreherfgetYeargetMonthgetDay getDatePartsgetHourgetMin getSecondsgetPicoseconds$fToUTCHerfTimeUTCTime$fToUTCHerfTimeUTCHerfTime$fFromUTCHerfTimeUTCTime$fFromUTCHerfTimeUTCHerfTime$fHerfedTimeUTCTime$fHerfedTimeUTCHerfTime$fHerfAddHerfPico$fHerfAddHerfSec$fHerfAddHerfMin$fHerfAddHerfHour$fHerfAddHerfDay$fHerfAddHerfWeek$fHerfAddHerfMonth$fHerfAddHerfYear$fEqUTCHerfTime$fOrdUTCHerfTime$fShowUTCHerfTime$fFormatTimeUTCHerfTime $fNumHerfYear $fEqHerfYear $fOrdHerfYear$fShowHerfYear$fNumHerfMonth $fEqHerfMonth$fOrdHerfMonth$fShowHerfMonth $fNumHerfWeek $fEqHerfWeek $fOrdHerfWeek$fShowHerfWeek $fNumHerfDay $fEqHerfDay $fOrdHerfDay $fShowHerfDay $fNumHerfHour $fEqHerfHour $fOrdHerfHour$fShowHerfHour $fNumHerfMin $fEqHerfMin $fOrdHerfMin $fShowHerfMin $fNumHerfSec $fEqHerfSec $fOrdHerfSec $fShowHerfSec $fNumHerfPico $fEqHerfPico $fOrdHerfPico$fShowHerfPico HerfZonedTime addTimeZone toZonedTime fromZonedTimeherfzreherfz$fHerfedTimeHerfZonedTime$fFromUTCHerfTimeHerfZonedTime$fToUTCHerfTimeHerfZonedTime$fShowHerfZonedTime$fFormatTimeHerfZonedTime$fParseTimeHerfZonedTimedateHerftime time-1.8.0.2Data.Time.Format formatTimeNumericPadOption FormatTimeformatCharacterData.Time.Format.Parse readsTimereadTime parseTime readPTime readSTimeparseTimeOrError parseTimeM ParseTime buildTime&Data.Time.LocalTime.Internal.ZonedTimeutcToLocalZonedTime getZonedTimezonedTimeToUTCutcToZonedTime ZonedTimezonedTimeToLocalTime zonedTimeZoneData.Time.Format.Localerfc822DateFormatiso8601DateFormatdefaultTimeLocale TimeLocalewDaysmonthsamPm dateTimeFmtdateFmttimeFmt time12FmtknownTimeZones&Data.Time.LocalTime.Internal.LocalTimelocalTimeToUT1ut1ToLocalTimelocalTimeToUTCutcToLocalTime LocalTimelocalDaylocalTimeOfDay&Data.Time.LocalTime.Internal.TimeOfDaytimeOfDayToDayFractiondayFractionToTimeOfDaytimeOfDayToTimetimeToTimeOfDaylocalToUTCTimeOfDayutcToLocalTimeOfDaymakeTimeOfDayValidmiddaymidnight TimeOfDaytodHourtodMintodSec%Data.Time.LocalTime.Internal.TimeZonegetCurrentTimeZone getTimeZoneutctimeZoneOffsetStringtimeZoneOffsetString'hoursToTimeZoneminutesToTimeZoneTimeZonetimeZoneMinutestimeZoneSummerOnly timeZoneName Data.Time.Clock.Internal.UTCDiff diffUTCTime addUTCTimeData.Time.Clock.POSIXgetCurrentTime&Data.Time.Clock.Internal.UniversalTime UniversalTime ModJulianDategetModJulianDate Data.Time.Clock.Internal.UTCTimeUTCTimeutctDay utctDayTime#Data.Time.Clock.Internal.SystemTimegetTime_resolution(Data.Time.Clock.Internal.NominalDiffTime nominalDayNominalDiffTime!Data.Time.Clock.Internal.DiffTimediffTimeToPicosecondspicosecondsToDiffTimesecondsToDiffTimeDiffTimeData.Time.Calendar.GregorianaddGregorianYearsRollOveraddGregorianYearsClipaddGregorianMonthsRollOveraddGregorianMonthsClipgregorianMonthLength showGregorianfromGregorianValid fromGregorian toGregorianData.Time.Calendar.OrdinalDate isLeapYearData.Time.Calendar.DaysdiffDaysaddDaysDayModifiedJulianDaytoModifiedJulianDay