my $nbdays = ($diff_to_doomsdates + $year_anchor_day + 2) % 7; # or -5