| 125 | 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}; |
| 126 | |
| 127 | constexpr int DayOfYearToMonth(ui32& yearDay, const bool leapYear) { |
| 128 | if (yearDay >= 31 + 28 + leapYear) { |
| 129 | yearDay += 2 - leapYear; |
| 130 | } |
| 131 | const ui32 month = (yearDay * 67 + 35) >> 11; |
| 132 | yearDay -= (month * 489 + 8) >> 4; |
| 133 | return static_cast<int>(month); |
| 134 | } |
| 135 | |
| 136 | class TDayNoToYearLookupTable { |
| 137 | static constexpr int TableSize = 128; |