greg/lib.rs
1//! Simple Unobtrusive Date & Time Library
2//!
3//! Greg is a simple datetime library that doesn't get in your way.
4//! You get to access the struct fields.
5//! Timezone support is provided in [`greg-tz`](https://docs.rs/greg-tz).
6//!
7//!
8//! 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.
9//!
10//! 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.
11//!
12//! Other notable caveats include:
13//! - no `strftime` type formatting (only `YYYY-MM-DD` and `hh:mm:ss` provided)
14//! - no locale support
15//! - no [leap second] support
16//!
17//! [leap second]: https://en.wikipedia.org/wiki/Leap_second
18
19#![allow(clippy::zero_prefixed_literal)]
20#![cfg_attr(docsrs, feature(doc_auto_cfg))]
21
22pub mod real;
23pub use real::{
24 Point,
25 Span,
26 Frame,
27 Scale
28};
29pub mod calendar;
30pub use calendar::{
31 Calendar,
32 Utc
33};
34
35#[cfg(test)]
36mod tests;