| Crates.io | ext-time |
| lib.rs | ext-time |
| version | 0.3.1 |
| created_at | 2025-02-01 10:24:21.44248+00 |
| updated_at | 2025-03-22 05:02:19.968341+00 |
| description | A Rust library that extends the time crate with additional useful methods for time manipulation and formatting |
| homepage | |
| repository | https://github.com/rain2307/ext-time |
| max_upload_size | |
| id | 1538336 |
| size | 43,089 |
A Rust library providing extension traits for time manipulation, built on top of the time crate.
Time and OffsetDateTimeAdd this to your Cargo.toml:
[dependencies]
ext-time = "0.1.0"
use ext_time::{ExtTime, ExtOffsetDateTime};
use time::{Time, OffsetDateTime};
// Time operations
let time = Time::from_hms(14, 30, 45).unwrap();
let next_hour = time.next_hour();
let aligned = time.align_to(300).unwrap(); // Align to 5 minutes
// DateTime operations
let dt = OffsetDateTime::now_utc();
let start_of_day = dt.start_of_day();
let end_of_month = dt.end_of_month();
MIT