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
//! WHERE the wildcard sits, which is the half of Vixie's union rule the seam could not see.
//!
//! `10,*` and `*,10` are one set of days written two ways — every day of the month, either way — and
//! they land on OPPOSITE SIDES of the rule that combines the two day fields: the dialect counts a
//! LEADING star as the wildcard that turns the union's *or* into an *and*. So `0 3 *,10 * MON` is
//! Mondays and `0 3 10,* * MON` is every day, from two spellings of one day set.
//!
//! The seam used to answer this itself, from a pair of restricted-flags that carry the same value
//! for both spellings; the dialect decides it now, and these are the assertions that say so. They
//! are the migration's own pin rather than a general test of cron: the suite beside this module
//! covers what the seam DOES, and this covers the one answer the swap CHANGED.
use Timestamp;
use Calendar;
/// The dates of the next `count` occurrences after `from`.
///
/// The DAY is the whole question here, so the clock is dropped from the rendering rather than
/// asserted alongside it — every expression below fires at 03:00 and none of them is about that.
/// Read an expression in a zone with no transitions, so a day is a day.
/// NEITHER day field carries a wildcard, so the union is an OR — the baseline the other two move
/// away from.
///
/// `0 3 10 * MON` fires on the tenth AND on every Monday. March 2026 opens on a Sunday, so its
/// Mondays are the 2nd, 9th, 16th, 23rd and 30th, and the 10th is a Tuesday that only the
/// day-of-month field reaches.
/// A TRAILING star leaves the union an OR, and a day-of-month field that admits every day makes that
/// OR fire every day.
///
/// `10,*` names every day of the month and does not lead with the star, so the rule stays an *or*
/// and the left side of it is already true — every day fires, Monday or not.
/// A LEADING star turns the union into an AND, so the same day set becomes Mondays only.
///
/// This is the pair's whole point: `*,10` admits exactly the days `10,*` admits, and answers
/// differently — the thing a restricted-flag shared between the two spellings cannot express.
/// And the leading-star spelling is the BARE star's equal, which is what says the *and* is the
/// wildcard's doing rather than the list's.
///
/// `0 3 *,10 * MON` and `0 3 * * MON` denote one schedule; a reading that treated a two-item list as
/// a restriction would separate them.