]> git.proxmox.com Git - rustc.git/blobdiff - vendor/chrono/src/naive/datetime.rs
New upstream version 1.47.0~beta.2+dfsg1
[rustc.git] / vendor / chrono / src / naive / datetime.rs
index d40ff20f087ea56c6ce39f85d6a5a8265de9585e..a768609cfc98da085f53b6c5d93f1647dfd6d7a6 100644 (file)
@@ -15,6 +15,8 @@ use div::div_mod_floor;
 use format::DelayedFormat;
 use format::{parse, ParseError, ParseResult, Parsed, StrftimeItems};
 use format::{Fixed, Item, Numeric, Pad};
+use naive::date::{MAX_DATE, MIN_DATE};
+use naive::time::{MAX_TIME, MIN_TIME};
 use naive::{IsoWeek, NaiveDate, NaiveTime};
 use {Datelike, Timelike, Weekday};
 
@@ -26,6 +28,11 @@ use {Datelike, Timelike, Weekday};
 /// touching that call when we are already sure that it WILL overflow...
 const MAX_SECS_BITS: usize = 44;
 
+/// The minimum possible `NaiveDateTime`.
+pub const MIN_DATETIME: NaiveDateTime = NaiveDateTime { date: MIN_DATE, time: MIN_TIME };
+/// The maximum possible `NaiveDateTime`.
+pub const MAX_DATETIME: NaiveDateTime = NaiveDateTime { date: MAX_DATE, time: MAX_TIME };
+
 /// ISO 8601 combined date and time without timezone.
 ///
 /// # Example