Crate greg

source · []
Expand description

Simple Date & Time library

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 TimeDate, Time, Weekday, formatting & Time Zones
Real TimePoint, Span, Frame & Scale

Macros

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