utc-datetime

Crates.ioutc-datetime
lib.rsutc-datetime
version0.1.17
sourcesrc
created_at2020-04-26 09:04:56.42921
updated_at2021-11-16 17:02:50.595008
descriptionReturn timestamp of UTC datetime,Convert time string to UTC datetime
homepage
repositoryhttps://github.com/c3qu/utc-datetime
max_upload_size
id234197
size9,702
(c3qu)

documentation

https://docs.rs/utc-datetime

README

The main function

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.

Commit count: 26

cargo fmt