rstime 0.1.0

A zero-dependency Rust time library providing date, time, datetime types with formatting, parsing, Unix timestamps, and clock functionality.
Documentation
//! # rstime
//!
//! A zero-dependency enhanced time library for Rust, built using the standard library.
//!
//! Provides date, time, datetime types with formatting, parsing, arithmetic,
//! Unix timestamp conversion, and clock functionality.
//!
//! ## Features
//!
//! - **Zero Dependencies**: Pure standard library implementation
//! - **Date & Time Types**: `Date`, `Time`, `DateTime` with validation
//! - **Duration & TimeDelta**: Positive and signed duration types with arithmetic
//! - **Custom Formatting**: `{YYYY}`, `{MM}`, `{DD}`, `{HH}`, `{mm}`, `{ss}` token system
//! - **Parsing**: Parse dates/times from strings with format patterns
//! - **ISO 8601**: Built-in ISO 8601 parsing and formatting
//! - **Weekday Calculation**: Zeller's formula for accurate weekday computation
//! - **Unix Timestamps**: Convert between `DateTime` and Unix timestamps
//! - **Clock**: System clock and monotonic clock for timing
//! - **12/24 Hour**: 12-hour clock conversion with AM/PM
//!
//! ## Quick Start
//!
//! ```rust
//! use rstime::{Date, Time, DateTime, Duration, TimeFormat};
//!
//! // Date handling
//! let date = Date::new(2026, 5, 10);
//! println!("{}", date);                    // 2026-05-10
//! println!("{}", date.weekday());          // Sunday
//!
//! // Time handling
//! let time = Time::new(14, 5, 9, 0);
//! println!("{}", time);                    // 14:05:09
//!
//! // Formatting
//! let dt = DateTime::new(date, time);
//! println!("{}", dt.format("{YYYY}年{MM}月{DD}日 {HH}:{mm}")); // 2026年05月10日 14:05
//!
//! // Clock
//! let now = DateTime::now();
//! println!("Now: {}", now);
//! ```
//!
//! ## Custom Format Tokens
//!
//! | Token | Description | Example |
//! |-------|-------------|---------|
//! | `{YYYY}` | 4-digit year | `2026` |
//! | `{MM}` | 2-digit month | `05` |
//! | `{DD}` | 2-digit day | `10` |
//! | `{HH}` | 24-hour | `14` |
//! | `{hh}` | 12-hour | `02` |
//! | `{mm}` | Minutes | `05` |
//! | `{ss}` | Seconds | `09` |
//! | `{SSS}` | Milliseconds | `037` |
//! | `{W}` | Short weekday | `Sun` |
//! | `{WW}` | Full weekday | `Sunday` |
//! | `{AMPM}` | Uppercase AM/PM | `PM` |
//! | `{ampm}` | Lowercase am/pm | `pm` |

pub mod clock;
pub mod date;
pub mod datetime;
pub mod duration;
pub mod error;
pub mod format;
pub mod parse;
pub mod time;

pub use clock::{Clock, MonotonicClock, SystemClock};
pub use date::{Date, Weekday};
pub use datetime::DateTime;
pub use duration::{Duration, TimeDelta};
pub use error::{RstimeError, RstimeResult};
pub use format::TimeFormat;
pub use parse::{parse_date, parse_datetime, parse_iso8601, parse_time};
pub use time::Time;