Class NewZealand
The New Zealand calendars.
public sealed class NewZealand : Calendar, IEquatable<Calendar>
- Inheritance
-
NewZealand
- Implements
- Inherited Members
Remarks
Common holidays:
- Saturdays
- Sundays
- New Year's Day, January 1st (possibly moved to Monday or Tuesday)
- Day after New Year's Day, January 2st (possibly moved to Monday or Tuesday)
- Waitangi Day. February 6th (possibly moved to Monday since 2013)
- Good Friday
- Easter Monday
- ANZAC Day. April 25th (possibly moved to Monday since 2013)
- Queen's Birthday, first Monday in June
- Labour Day, fourth Monday in October
- Christmas, December 25th (possibly moved to Monday or Tuesday)
- Boxing Day, December 26th (possibly moved to Monday or Tuesday)
- Matariki, in June or July, official calendar released for years 2022-2052
Additional holidays for Wellington: Anniversary Day, Monday nearest January 22nd. Additional holidays for Auckland: Anniversary Day, Monday nearest January 29nd.
The holiday rules for New Zealand were documented by David Gilbert for IDB (http://www.jrefinery.com/ibd/). The Matariki holiday calendar has been released by the NZ Government (https://www.legislation.govt.nz/act/public/2022/0014/latest/LMS557893.html).
Constructors
NewZealand(NewZealandMarket)
Initializes a new instance of the NewZealand class for the given market.
public NewZealand(NewZealandMarket market = NewZealandMarket.Wellington)
Parameters
marketNewZealandMarketThe market whose holidays the calendar follows; Wellington 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.