Expand description
§vardadieniai
Lietuvos vardadienių kalendorius: kurie vardai švenčiami pasirinktą dieną, kada švenčia konkretus vardas ir kas švenčia šiandien (Vilniaus laiku). Lithuanian name day calendar: names by date, dates by name and today’s names in Europe/Vilnius time. No dependencies.
The calendar for people, with today’s and tomorrow’s names, greetings and gift ideas: https://dovanasuvardu.lt/vardadieniai/
assert!(vardadieniai::names_on(11, 9).contains(&"Teodoras"));
assert!(vardadieniai::days_for("ąžuolas").iter().all(|&(m, _)| (1..=12).contains(&m)));
assert_eq!(vardadieniai::format_date(11, 9), "lapkričio 9 d.");Code: MIT. Name day data: CC BY-SA 4.0 (source: Lithuanian Wikipedia).
Structs§
- Date
- A calendar date (proleptic Gregorian calendar).
Constants§
- HOMEPAGE
- Online name day calendar (Lithuanian).
- MONTHS_
LT - Lithuanian month names in the genitive case (
sausio…gruodžio).
Functions§
- days_
for - Days
(month, day)on which the name is celebrated. Case and diacritics are ignored, so"azuolas"findsĄžuolas. - days_
in_ month - Number of days in the month.
- fold
- Lowercases the text and removes Lithuanian diacritics (
Ąžuolas->azuolas). - format_
date - Lithuanian date label, e.g.
format_date(11, 9)="lapkričio 9 d.". - is_leap
truefor leap years.- month
- All days of a month (
1..=12) with their names, in calendar order. - names_
on - Names celebrated on the given day (
month1–12,day1–31). Returns an empty slice for a date that is not in the calendar. - today
- Names celebrated today in Lithuania.
- tomorrow
- Names celebrated tomorrow in Lithuania.
- vilnius_
date - The date in Lithuania (Europe/Vilnius: UTC+2, UTC+3 from the last Sunday of March to the last Sunday of October, switching at 01:00 UTC) for a Unix timestamp in seconds.
- vilnius_
today - Today’s date in Lithuania.