Crates.io | utc-datetime |
lib.rs | utc-datetime |
version | 0.1.17 |
source | src |
created_at | 2020-04-26 09:04:56.42921 |
updated_at | 2021-11-16 17:02:50.595008 |
description | Return timestamp of UTC datetime,Convert time string to UTC datetime |
homepage | |
repository | https://github.com/c3qu/utc-datetime |
max_upload_size | |
id | 234197 |
size | 9,702 |
impl UtcDatetime{
fn new(year:u16,month:u8,day:u8,hour:u8,minute:u8,second:u8)->Result<UTCDatetime, IllegalTimeError>;
fn timestamp(&self)->Result<u32,IllegalTimeError>;
fn weekday(&self)->u8;
fn from_string(time_str:&str)->Result<UTCDatetime, IllegalTimeError>;
}
The UTCDatetime structure derives PartialEq and PartialOrd, you can directly use <,>, ==, <=,>=,!= for comparison.