Formula (extracted LaTeX)
\[d' = d - 1,\quad R = S + o \cdot d'\]
d' = d - 1,\quad R = S + o \cdot d'
Formula (extracted LaTeX)
\[\text{leap}(y) \iff (y \bmod 4 = 0) \land (y \bmod 100 \ne 0 \lor y \bmod 400 = 0).\]
\text{leap}(y) \iff (y \bmod 4 = 0) \land (y \bmod 100 \ne 0 \lor y \bmod 400 = 0).
Formula (extracted text)
Calendar days (exclusive counting): Let S be the start date and d ∈ ℕ the number of days. For operation o ∈ {+1 (add), −1 (subtract)}: $ R = S + o \cdot d $ Inclusive counting: If the start date counts as day one and d > 0, compute $ d' = d - 1,\quad R = S + o \cdot d' $ Business days (Mon–Fri) with holiday set H: Let B(n) advance by one day in the direction of o until a business day not in H is encountered, repeating n times: $ R = B^{(d')}(S) $ Leap years follow Gregorian rules: $ \text{leap}(y) \iff (y \bmod 4 = 0) \land (y \bmod 100 \ne 0 \lor y \bmod 400 = 0). $