chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Export `chrono::naive::time::M{AX,IN}_TIME`

Open sanmai-NL opened this issue 4 years ago • 1 comments

Without this, I have to write

let zerotime = NaiveTime::from_hms(0, 0, 0);

multiple times, since NaiveTime::from_hms isn't const.

sanmai-NL avatar Oct 28 '21 10:10 sanmai-NL

Prior art: https://docs.rs/time/0.3.4/time/struct.Time.html#associatedconstant.MIDNIGHT.

sanmai-NL avatar Oct 28 '21 11:10 sanmai-NL

NaiveTime::MIN was made public in https://github.com/chronotope/chrono/pull/890.

NaiveTime::MAX seems a bit questionable to me. For one because it does not account for leap seconds.

pitdicker avatar Jun 07 '23 09:06 pitdicker