Crate greg

Source
Expand description

Simple Unobtrusive Date & Time Library

Greg is a simple datetime library that doesn’t get in your way. You get to access the struct fields. Timezone support is provided in greg-tz.

Organized into two categories: real / physical time dealing only in seconds and the more abstract calendar time dealing with dates, time-of-day and time zones as understood by humans.

Note that for the time being this library only operates at the precision of a full second – this is more convenient to work with, but it is far too imprecise for many applications.

Other notable caveats include:

  • no strftime type formatting (only YYYY-MM-DD and hh:mm:ss provided)
  • no locale support
  • no leap second support

Re-exports§

pub use real::Point;
pub use real::Span;
pub use real::Frame;
pub use real::Scale;
pub use calendar::Calendar;
pub use calendar::Utc;

Modules§

calendar
Calendar TimeDate, Time, Weekday, formatting & Time Zones
real
Real TimePoint, Span, Frame & Scale

Macros§

utc
Create a Point from YYYY-MM-DD hh:mm:ss in UTC
ymd_hms
Create a DateTime from YYYY-MM-DD hh:mm:ss