Check If a Date In a Time Period Is a Weekday

The Temporal Is Weekday function returns true on dates that are weekdays and false on dates that are weekends from the specified start date (inclusive) to the end date (exclusive). Note that this function will return uncertain outside of the date range. The syntax for this function is:

  • TemporalIsWeekday(<start date>,<end date>)

For example, to determine if the bank is open on a given day when the bank is only open on weekdays, you would write this rule in Word:

the bank is open if

TemporalIsWeekday(2019-07-01, 2019-07-15)

The function returns a value of true for dates that are weekdays and false for the dates that are weekends. Where the start date is 1 July 2019 (a Monday) and the end date is 15 July 2019, the value of 'the bank is open' is shown in the following table.

Table 1. Conclusions in a TemporalIsWeekday rule
Calculation Date the bank is open
pre 01/07/2019 uncertain
01/07/2019 true
06/07/2019 false
08/07/2019 true
13/07/2019 false
15/07/2019 uncertain