Expand description
Monthly shift counts and work/rest tracking.
All functions iterate day-by-day through the target range and call
get_shift_type_for_date for each day.
Ported from Flutter shift_metrics.dart and Android shift_metrics.kt.
Functionsยง
- consecutive_
work_ days - Count consecutive work days looking backward from
today(inclusive). - count_
shift_ type_ in_ month - Count how many days of a given shift type occur in a month.
- count_
work_ days_ in_ month - Count total working days (Morning + Afternoon + Night) in a month.
- days_
until_ next_ rest - Days until the next rest day, starting from tomorrow (excludes today).