úÎ![W B      !"#$%&'()*+,-./0123456789:;<=>?@A(C) 2013-2017 Jann Müller BSD3 (see the file LICENSE) j.mueller.11@ucl.ac.uk  experimental Safe"#;=QV"„ time-patterns3IntervalSequences that can be evaluated repeatedly. time-patternsDA sequence of intervals, starting from a point. If the argument to  nextIntervalO is part of an interval, then the result should be the interval containing it. time-patternsA sequence with no occurrences time-patterns;Occurrences from both intervals. The difference between union and diag is that union& preserves the order of the results time-patterns6Merge two sequences into one by switching between them time-patterns"End a sequence after n occurrences  time-patternsRepeat a point infinitely  time-patternsETake occurrences until an interval containing the argument is reached  time-patterns[Take occurrences until an interval whose supremum is greater than the argument is reached.  time-patternsNStop as soon as a result greater than or equal to the parameter is produced  time-patterns+Prepend an interval to an interval sequence time-patternsTake every nth occurrence time-patterns(Accept results which satisfy a condition time-patterns3Check if a point is covered by an interval sequence time-patterns2The sequence of occurrences from an initial point. time-patterns?Elements covered by an interval sequence from an initial point. time-patterns*Skip the first n occurrences of a sequence time-patterns<Skip intervals until the infimum of the argument is reached.ZIf the intervals in the sequence are not ordered, then this function might not terminate. time-patternsPSkip over a point in the sequence. All occurrences of this datum are removed. time-patterns3Skip over all intervals which contain the parameter time-patternsRSearch for the first result within the specified interval, starting from a point.ZIf the intervals in the sequence are not ordered, then this function might not terminate. time-patterns*Return intervals that are exactly the same  (C) 2013-2017 Jann Müller BSD3 (see the file LICENSE) j.mueller.11@ucl.ac.uk  experimental Safe"#U×+ time-patternsA - describes a sequence of intervals of type B. time-patterns!An event that occurs every month. time-patternsEvery January. time-patternsEvery February.  time-patterns Every March.! time-patterns Every April." time-patterns Every May.# time-patterns Every June.$ time-patterns Every July.% time-patterns Every August.& time-patternsEvery September.' time-patternsEvery October.( time-patternsEvery November.) time-patternsEvery December.* time-patternsAn event that occurs every day.+ time-patterns Every Monday., time-patternsEvery Tuesday.- time-patternsEvery Wednesday.. time-patternsEvery Thursday./ time-patterns Every Friday.0 time-patternsEvery Saturday.1 time-patterns Every Sunday.2 time-patternsWeeks, starting on Monday3 time-patternsWeeks, starting on Sunday.4 time-patternsYears, starting from Jan. 15 time-patternsLThe first pattern repeated for each interval of the second pattern. E.g.: '(take 3 $ every 4 monday) `inEach` year=will give the fourth, eighth and twelveth Monday in each yearC time-patternslike inEach, except that the `inner‘` DatePattern is replaced by a sequence of DatePatterns so that for every new outer interval, the next element from the sequence will be used.6 time-patterns(Shift all the results by a number of day7 time-patternsTake every nth occurrence8 time-patternsStop after n occurrences9 time-patternsSkip the first n occurrences: time-patterns…Skip over all occurrences of a day. If the pattern describes a period longer than a day, the entire period will be skipped.; time-patterns+Check if a date is covered by a DatePattern< time-patterns5Get occurrences of an event starting with a given day= time-patternsAn event that never occurs> time-patterns9Return only occurrences that are present in both patterns Qlet myBirthday = (take 1 day) `inEach` august let s = intersect myBirthday sunday7Will return August 1 in years when it falls on a Sunday? time-patternsOccurrences of both patterns. union april june2Will return the months April and June in each year |let fifteenth = (take 1 $ skip 14 day) `inEach` month let third = (take 1 $ skip 2 day) `inEach` month union fifteenth third.Will return the 3rd and the 15th of each month@ time-patternsUGet the date intervals described by the pattern, starting from the specified date.pThe intervals range from the first day included by the pattern to the first day after it, so a single day d would be described as (d ... succ d)c and the interval for a month will go from the 1st of the month to the 1st of the next month.D time-patterns\Check if a day interval covers exactly a given weekday with Monday = 1, Tuesday = 2, etc.E time-patterns)Get the last Monday before or on the dateF time-patterns)Get the last Sunday before or on the dateG time-patternsGet the beginning of a yearA time-patterns;Only include date intervals that end before the given date. Ó>> let third = (take 1 $ skip 2 day) `inEach` month >> let pattern = third `until` (fromGregorian 2020 12 01) >> instancesFrom (fromGregorian 2017 01 01) pattern [2017-01-03,2017-02-03 ... 2020-10-03,2020-11-03]& !"#$%&'()*+,-./0123456789:;<=>?@A&*234 !"#$%&'()+,-./01=76589:>?A;<@H      !"#$%&'()*+,-./012345678 9:;<=>?@ABCD,time-patterns-0.1.4.3-14hkCu6LzhVGGa5apoX8DgData.Time.Patterns.InternalData.Time.PatternsIntervalSequence'IntervalSequence nextInterval mapSequenceneveruniondiagtakecyclestopAtstopAt'beforeandTheneveryfilter elementOfoccurrencesFrom elementsFromskip skipUntilexceptexcept'firstOccurrenceIn intersectelements$fMonoidIntervalSequence$fSemigroupIntervalSequence DatePatternmonthjanuaryfebruarymarchaprilmayjunejulyaugust septemberoctobernovemberdecemberdaymondaytuesday wednesdaythursdayfridaysaturdaysunday mondayWeek sundayWeekyearinEachshiftBy instancesFrom intervalsFromuntil time-1.8.0.2Data.Time.Calendar.DaysDayinEach' isDayOfWeek lastMonday lastSundayjan1