Skip to content

Commit

Permalink
Make gofmt happy
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinrovira committed May 28, 2023
1 parent bac0692 commit 46e150c
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions quartz/internal/csm/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// instant that fits the expression?
//
// The method CronStateMachine.NextTriggerTime() (cron_state_machine.go)
// computes the answer. The current solution is not proven to be mathematically correct.
// computes the answer. The current solution is not proven to be mathematically correct.
// However, it has been thoroughly validated with multiple complex test cases.
//
// A date can be though of as a mixed-radix number (https://en.wikipedia.org/wiki/Mixed_radix).
Expand All @@ -14,28 +14,9 @@
//
// Second, if no fields are changed by this process, we must perform the smallest possible step forward
// to find the next valid value. This involves moving forward the least significant field (second),
// taking care to advance the next significant field when the previous one overflows. This process is
// taking care to advance the next significant field when the previous one overflows. This process is
// implemented in CronStateMachine.next() (fn_next.go).
//
// In short, the algorithm can be summarized as follows:
//
// ┌─────────────────────────────────┐
// │ findForward() from current date │
// └───────────────┬─────────────────┘
// │
// │
// │
// ┌─────────▼──────────┐
// │ Was Date updated? ├─────Yes─────────────┐
// └─────────┬──────────┘ │
// │ │
// No │
// │ │
// ┌───────────────▼────────────────┐ ┌───▼───┐
// │ find next() smallest timestep ├───────────► Done │
// └────────────────────────────────┘ └───────┘
//
//
// NOTE: Some precautions must be taken as the "day" value does not have a constant radix. It depends
// on the month and the year. January always has 30 days, while February 2024 has 29. This is taken into account
// by the DayNode struct (day_node.go) and CronStateMachine.next() (fn_next.go).
Expand Down

0 comments on commit 46e150c

Please sign in to comment.