|
1 | | -// "csm" is an internal package focused on solving a single task. |
| 1 | +// Package csm is an internal package focused on solving a single task. |
2 | 2 | // Given an arbitrary date and cron expression, what is the first following |
3 | 3 | // instant that fits the expression? |
4 | 4 | // |
|
10 | 10 | // First, we must check from most significant (year) to least significant (second) for |
11 | 11 | // any field that is invalid according to the cron expression, and move it forward to the |
12 | 12 | // next valid value. This resets less significant fields and can overflow; advancing more |
13 | | -// significant fields. This process is implemented in CronStateMachine.findForward() (fn_find_forward.go). |
| 13 | +// significant fields. This process is implemented in CronStateMachine.findForward() |
| 14 | +// (fn_find_forward.go). |
14 | 15 | // |
15 | | -// Second, if no fields are changed by this process, we must perform the smallest possible step forward |
16 | | -// to find the next valid value. This involves moving forward the least significant field (second), |
17 | | -// taking care to advance the next significant field when the previous one overflows. This process is |
18 | | -// implemented in CronStateMachine.next() (fn_next.go). |
| 16 | +// Second, if no fields are changed by this process, we must perform the smallest |
| 17 | +// possible step forward to find the next valid value. This involves moving forward |
| 18 | +// the least significant field (second), taking care to advance the next significant |
| 19 | +// field when the previous one overflows. This process is implemented in CronStateMachine.next() |
| 20 | +// (fn_next.go). |
19 | 21 | // |
20 | | -// NOTE: Some precautions must be taken as the "day" value does not have a constant radix. It depends |
21 | | -// on the month and the year. January always has 30 days, while February 2024 has 29. This is taken into account |
22 | | -// by the DayNode struct (day_node.go) and CronStateMachine.next() (fn_next.go). |
| 22 | +// NOTE: Some precautions must be taken as the "day" value does not have a constant radix. |
| 23 | +// It depends on the month and the year. January always has 30 days, while February 2024 has 29. |
| 24 | +// This is taken into account by the DayNode struct (day_node.go) and CronStateMachine.next() |
| 25 | +// (fn_next.go). |
23 | 26 | package csm |
0 commit comments