1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//! Matariki (Māori New Year) public holiday dates (private implementation).
//!
//! # `time_compute` extension -- not part of chrono
//! Backs [`crate::NaiveDate::matariki`] -- see that method's rustdoc (in
//! `naive/date.rs`) for the public API and sourcing notes. This module
//! holds only the private lookup table.
//!
//! Unlike every other calendar/festival function in this crate, Matariki
//! is **not** computed from a formula (astronomical or arithmetic): the
//! date is fixed each year by New Zealand's Matariki Advisory Committee
//! and legislated as a public holiday. The committee's own criterion
//! ("the Friday closest to the Tangaroa lunar phase in the lunar month
//! of Pipiri, during which the Matariki star cluster/Pleiades makes its
//! pre-dawn midwinter rising") is a description of *how the committee
//! chooses*, not a closed-form rule a program can reliably reproduce --
//! Tangaroa is a several-day phase window, not a single instant, so
//! "closest Friday" can genuinely go either way at the edges (and, per
//! the committee's own published table, occasionally does not land on
//! the single naively-nearest Friday at all). Reverse-engineering an
//! approximate formula would risk silently disagreeing with the actual
//! legal public holiday date, which defeats the point.
//!
//! The dates below are transcribed from the Museum of New Zealand Te
//! Papa Tongarewa's official published table (2022-2052, "agreed upon
//! by the Matariki Advisory Committee"), cross-checked against RNZ's
//! 2022 report that the government announced all 30 years' worth of
//! dates at once. All 31 dates were verified to fall on a Friday (as
//! the committee's own rule requires) before being transcribed here.
//!
//! # `time_compute` extension -- not part of chrono
//! No chrono equivalent (a 2022-era New Zealand public holiday). Added
//! after Fabrice asked about Pacific/Oceania festivals following the
//! Chinese and Thai/Buddhist calendar work above.
use crateNaiveDate;
/// `(year, month, day)` for every officially published Matariki public
/// holiday, 2022-2052 inclusive. See the module doc comment for why
/// this is a fixed table rather than a computed rule.
const MATARIKI_DATES: = ;
/// The officially published Matariki public holiday date for `year`, or
/// `None` if outside the 2022-2052 range this table covers (the
/// committee publishes these in batches, and has not published dates
/// beyond 2052 as of this writing).
pub