Class Canada
The Canadian calendars.
public sealed class Canada : Calendar, IEquatable<Calendar>
- Inheritance
-
Canada
- Implements
- Inherited Members
Remarks
Banking holidays (data from http://www.bankofcanada.ca/en/about/holiday.html):
- Saturdays
- Sundays
- New Year's Day, January 1st (possibly moved to Monday)
- Family Day, third Monday of February (since 2008)
- Good Friday
- Victoria Day, the Monday on or preceding May 24th
- Canada Day, July 1st (possibly moved to Monday)
- Provincial Holiday, first Monday of August
- Labour Day, first Monday of September
- National Day for Truth and Reconciliation, September 30th (possibly moved to Monday)
- Thanksgiving Day, second Monday of October
- Remembrance Day, November 11th (possibly moved to Monday)
- Christmas, December 25th (possibly moved to Monday or Tuesday)
- Boxing Day, December 26th (possibly moved to Monday or Tuesday)
Holidays for the Toronto stock exchange (data from http://www.tsx.com/en/about_tsx/market_hours.html):
- Saturdays
- Sundays
- New Year's Day, January 1st (possibly moved to Monday)
- Family Day, third Monday of February (since 2008)
- Good Friday
- Victoria Day, the Monday on or preceding May 24th
- Canada Day, July 1st (possibly moved to Monday)
- Provincial Holiday, first Monday of August
- Labour Day, first Monday of September
- Thanksgiving Day, second Monday of October
- Christmas, December 25th (possibly moved to Monday or Tuesday)
- Boxing Day, December 26th (possibly moved to Monday or Tuesday)
Constructors
Canada(CanadaMarket)
Initializes a new instance of the Canada class for the given market.
public Canada(CanadaMarket market = CanadaMarket.Settlement)
Parameters
marketCanadaMarketThe market whose holidays the calendar follows; the generic settlement calendar by default.
Exceptions
- ArgumentOutOfRangeException
The market isn't a member of the enum.
Properties
Name
Gets the calendar's name, used for output and comparison; not meant for switch-on-type code.
public override string Name { get; }
Property Value
Methods
IsBusinessDayCore(Date)
Whether the date is a business day by the calendar's own rules, before added and removed holidays.
protected override bool IsBusinessDayCore(Date date)
Parameters
dateDate
Returns
IsWeekend(Weekday)
Whether the weekday is part of the weekend for the given market.
public override bool IsWeekend(Weekday w)
Parameters
wWeekdayThe weekday.