holidays-ru
Russian holidays and working days lookup. Updated annually with the official production calendar.
Usage
Without dependencies — just year, month, day:
use ;
let result = .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 .unwrap
Bool shortcuts:
.unwrap.value; // true
.unwrap.value; // true
.unwrap.value; // true
Full calendar with regional holidays:
use Tatarstan;
let flags =
.unwrap
.value;
assert!; // Tatarstan Constitution Day
Date ranges use a half-open interval [start, end):
use WorkWeek;
let days_off =
.unwrap
.value;
let minutes =
.unwrap
.value;
assert_eq!;
assert_eq!;
Supported years
Federal calendar (Federal)
- 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.
Regional calendars (calendar::regions::*)
Overlay calendars with non-working holidays specific to subjects of the Russian Federation
(e.g. Tatarstan, Bashkortostan, Crimea). Each region has its own fact range
and falls back to a fixed-date prediction outside it. Regional calendars must be
combined with the federal calendar for a complete picture.
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::<Federal, _>(date) for chrono::NaiveDate |
time |
flags::<Federal, _>(date) for time::Date |
serde |
Serialize / Deserialize for DayFlags, Resolved<T> |
No features enabled — use flags_ymd::<Federal>(year, month, day).