dateless

Crates.iodateless
lib.rsdateless
version0.3.1
sourcesrc
created_at2021-04-26 17:04:14.497218
updated_at2021-05-09 16:29:56.149067
descriptionEvents & calendar library for Rust
homepage
repositoryhttps://gitlab.com/v1olen/dateless
max_upload_size
id389796
size46,752
(v1olen)

documentation

README



Dateless


Crates.io pipeline status license

Dateless

Dateless is an events & calendar library for Rust.

Usage

use dateless::prelude::*;
use chrono::{Utc, Duration};

fn main() {
    let mut calendar = Calendar::new();

    let event = EventPartial::new(String::from("Anne's birthday"))
        .whole_day(Utc::today())
        .weekly()
        .complete();

    calendar.add_event(event);

    let seven_days_later = Utc::today() + Duration::days(7);

    println!("{:#?}", calendar.day(seven_days_later));
}

It prints to stdout:

[
    EventOccurrence {
        name: "Anne's birthday",
        description: None,
        period: WholeDays(
            2021-05-08Z,
            2021-05-08Z,
        ),
    },
]

Contribution

Soon

Commit count: 63

cargo fmt