Calendar - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Date and Time : Calendar package : Calendar/IsWeekend

Calendar

  

IsWeekend

  

determine whether a date falls on a weekend

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

IsWeekend( d )

IsWeekend( year, month, day )

Parameters

d

-

Date; the date

year

-

integer; the year

month

-

posint; the month of the year

day

-

posint; the day of the month

Description

• 

The IsWeekend( d ) command determines whether the Date object d specifies a date that falls on a weekend. The command may also be used in the form IsWeekend( year, month, day ), with the year, month and day fields individually specified.

• 

In the POSIX locale, a date falls on a weekend if the day of the week is either Saturday (6) or Sunday (1).

Examples

withCalendar:

IsWeekend2017,11,3

false

(1)

IsWeekend2017,11,4

true

(2)

Compatibility

• 

The Calendar[IsWeekend] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

Calendar

Calendar[DayOfWeek]

Date