úÎK’G»@      !"#$%&'()*+,-./0123456789:;<=>?(C) 2013-2017 Jann MüllerBSD3 (see the file LICENSE)j.mueller.11@ucl.ac.uk experimentalSafe!"9;OT3IntervalSequences that can be evaluated repeatedly.DA 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.A sequence with no occurrences;Occurrences from both intervals. The difference between union and diag is that union& preserves the order of the results6Merge two sequences into one by switching between them"End a sequence after n occurrences Repeat a point infinitely ETake occurrences until an interval containing the argument is reached [Take occurrences until an interval whose supremum is greater than the argument is reached. NStop as soon as a result greater than or equal to the parameter is produced +Prepend an interval to an interval sequenceTake every nth occurrence(Accept results which satisfy a condition3Check if a point is covered by an interval sequence2The sequence of occurrences from an initial point.?Elements covered by an interval sequence from an initial point.*Skip the first n occurrences of a sequence<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.PSkip over a point in the sequence. All occurrences of this datum are removed.3Skip over all intervals which contain the parameterRSearch 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.*Return intervals that are exactly the same    (C) 2013-2017 Jann MüllerBSD3 (see the file LICENSE)j.mueller.11@ucl.ac.uk experimentalSafe!"*GA DatePattern describes a sequence of intervals of type Data.Thyme.Day.!An event that occurs every month.Every January.Every February. Every March.  Every April.! Every May." Every June.# Every July.$ Every August.%Every September.&Every October.'Every November.(Every December.)An event that occurs every day.* Every Monday.+Every Tuesday.,Every Wednesday.-Every Thursday.. Every Friday./Every Saturday.0 Every Sunday.1Weeks, starting on Monday2Weeks, starting on Sunday.3Years, starting from Jan. 14LThe 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 year@like 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.5(Shift all the results by a number of day6Take every nth occurrence7Stop after n occurrences8Skip the first n occurrences9…Skip over all occurrences of a day. If the pattern describes a period longer than a day, the entire period will be skipped.:+Check if a date is covered by a DatePattern;5Get occurrences of an event starting with a given day<An event that never occurs=9Return 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>Occurrences 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?UGet 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.A\Check if a day interval covers exactly a given weekday with Monday = 1, Tuesday = 2, etc.B)Get the last Monday before or on the dateC)Get the last Sunday before or on the dateDGet the beginning of a year0 !"#$%&'()*+,-./01234@56789:;<=>?ABCDEFGHIJ% !"#$%&'()*+,-./0123456789:;<=>?%)123 !"#$%&'(*+,-./0<654789=>:;?0 !"#$%&'()*+,-./01234@56789:;<=>?ABCDEFGHIJK      !"#$%&'()*+,-./01234567 89:;<=>?@ABCDE,time-patterns-0.1.4.0-8CZk4sXHtPDAN6qw4YUshtData.Time.Patterns.InternalData.Time.PatternsIntervalSequence'IntervalSequence nextInterval mapSequenceneveruniondiagtakecyclestopAtstopAt'beforeandTheneveryfilter elementOfoccurrencesFrom elementsFromskip skipUntilexceptexcept'firstOccurrenceIn intersectelements$fMonoidIntervalSequence DatePatternmonthjanuaryfebruarymarchaprilmayjunejulyaugust septemberoctobernovemberdecemberdaymondaytuesday wednesdaythursdayfridaysaturdaysunday mondayWeek sundayWeekyearinEachshiftBy instancesFrom intervalsFrominEach' isDayOfWeek lastMonday lastSundayjan1addYears addMonths firstOfMonth get1stOfMonthgetMonth monthOfYear