Crate date

Source
Expand description

The date-rs crate provides a simple, easy-to-use Date struct (and corresponding macro). Date provides storage for a single Gregorian calendar date.

Date can currently store any valid calendar date between years -65,536 and -65,535, although this may change in the future if its internal representation changes.

§Examples

Making a date:

use date::Date;

let date = Date::new(2012, 4, 21);

You can also use the date! macro to get a syntax resembling a date literal:

use date::date;

let date = date! { 2012-04-21 };

Modules§

interval
Intervals that can be added to or subtracted from dates.
iter
Iterator over dates

Macros§

date
Construct a date from a YYYY-MM-DD literal.

Structs§

Date
A representation of a single date.

Enums§

Weekday
A representation of the day of the week.