Skip to main content

Crate vestuviu_metines

Crate vestuviu_metines 

Source
Expand description

§vestuviu-metines

Lietuviški vestuvių metinių pavadinimai pagal metus (popierinės, medinės, sidabrinės, auksinės …) ir artimiausios metinės pagal vestuvių datą. Lithuanian wedding anniversary names by year and the next anniversary for a wedding date. No dependencies.

Every anniversary with gift ideas and wishes: https://vestuviumetines.lt/

use vestuviu_metines::{by_years, next_anniversary, Date};

assert_eq!(by_years(25).map(|a| a.name), Some("sidabrinės"));
let next = next_anniversary(Date::new(2010, 6, 12), Date::new(2026, 11, 16));
assert_eq!(next.date, Date::new(2027, 6, 12));
assert_eq!(next.years, 17);

Code: MIT. Data: CC BY-SA 4.0.

Structs§

Anniversary
A named wedding anniversary.
Date
A calendar date (proleptic Gregorian calendar).
NextAnniversary
The next anniversary for a wedding date (see next_anniversary).

Constants§

HOMEPAGE
Lithuanian guide to every wedding anniversary.

Functions§

all
All named anniversaries (1–80 years), ordered by years.
by_years
The anniversary for the given number of years, or None if that year has no name.
days_in_month
Number of days in the month.
is_leap
true for leap years.
nearest_named
The nearest named anniversary at or after the given number of years.
next_anniversary
The next anniversary (today or later) for a wedding date.
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.