holidays-ru
Russian holidays and working days lookup. Updated annually with the official production calendar.
Usage
Without dependencies — just year, month, day:
use holidays_ru;
let result = flags_ymd.unwrap;
let flags = result.value;
assert!;
assert!;
assert!;
With chrono (feature chrono) or time (feature time):
use NaiveDate;
use ;
let date = from_ymd_opt.unwrap;
match flags
Bool shortcuts:
is_day_off_ymd.unwrap.value; // true
is_holiday_ymd.unwrap.value; // true
is_short_day_ymd.unwrap.value; // true
Date ranges use a half-open interval [start, end):
use WorkWeek;
let days_off = non_working_days_between_ymd
.unwrap
.value;
let minutes = working_minutes_between_ymd
.unwrap
.value;
assert_eq!;
assert_eq!;
Supported years
- 1993–2026 — official production calendar data, returned as
Resolved::Fact. - 1900–2100 outside the official-data range — deterministic prediction based on the Labor Code, returned as
Resolved::Predict.
Prediction is deterministic and conservative. It is not an official production calendar. Official transfers are defined by yearly government decrees and may differ from the prediction.
Features
| Feature | Enables |
|---|---|
chrono |
flags(date) for chrono::NaiveDate |
time |
flags(date) for time::Date |
serde |
Serialize / Deserialize for DayFlags, Resolved<T> |
No features enabled — use flags_ymd(year, month, day).