Global

Methods

dayInMonth(day)

Matches based on the calendar day in the month
Parameters:
Name Type Description
day int the Day in the month, e.g. 11 for the 11th day of the month
Source:

dayOfWeekInMonth(day, nth)

Matches based on the day of the week in the month.
Parameters:
Name Type Description
day int the day of the week, 0=Sunday, 1=Monday, etc.
nth int If 1, it will match the first day (e.g. first Sunday) of the month, if 2 it will be the second, etc.
Source:

intersectionOf(expr1, expr2)

Specifies an intersection of two expression. Only those days will match this expression that match both (sub) expressions.
Parameters:
Name Type Description
expr1 Object first expression
expr2 Object second expression
Source:

months(months)

Match one or multiple months.
Parameters:
Name Type Description
months Array array of integers specifying months to match. 0=January, 1=February, etc.
Source:

negate(expr)

Specifies an expression that matches all days that do not match the expression given.
Parameters:
Name Type Description
expr Object The expression, created by one of the functions exported by TempEx.
Source:

notOnSpecificDates(dates)

Specifies an expression that matches all days that are not in a list of given days.
Parameters:
Name Type Description
dates Array array of Date instances
Source:

occurrences(expression, from, to)

Given a time interval (date range), determines all occurrences (days) within the interval for the given expression.
Parameters:
Name Type Description
expression Object An expression created by one of the factory functions
from Date start of time interval
to Date end of time interval
Source:

once(when)

Specifies an expression that matches one particular day.
Parameters:
Name Type Description
when Date = the day matched
Source:

onOrAfter(firstDay)

Specifies an expression that matches a day and all days after that day.
Parameters:
Name Type Description
firstDay Date The first day to match
Source:

onOrBefore(lastDay)

Specifies an expression that matches all days up to and including lastDay.
Parameters:
Name Type Description
lastDay Date last day to be matched.
Source:

onWeekdays(days)

Specifies an expression that matches days in the week, e.g. Mondays and Wednesday, but not all other week days.
Parameters:
Name Type Description
days Array Array of integers describing the days of the week, e.g. [0, 2, 3] will represent Sundays, Tuesdays and Wednesdays
Source:

union(expressions)

Matches the union of the expressions given: If any of the expressions provided matches, then it is a match.
Parameters:
Name Type Description
expressions Array array of expressions, as created by one of the factory functions of TempEx.
Source: