Crate time_range Copy item path Source pub use util::round_down_to_minute ;
pub use util::round_up_to_minute ;
pub use chrono ;
convert error format Formatting (and parsing) utilities for date and time. naive Date and time types unconcerned with timezones. offset The time zone, which calculates offsets from the local time to UTC. prelude A convenience module appropriate for glob imports (use chrono::prelude::*;
). round Functionality for rounding or truncating a DateTime
by a TimeDelta
. serde Serialization/Deserialization with serde util Date Deprecated ISO 8601 calendar date with time zone. DateRange A DateRange represents a range of dates. The range is inclusive of both the start and end dates. DateTime ISO 8601 combined date and time with time zone. Days A duration in calendar days. FixedOffset The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59. IsoWeek ISO 8601 week. Local The local timescale. Months A duration in calendar months NaiveDate ISO 8601 calendar date without timezone.
Allows for every proleptic Gregorian date from Jan 1, 262145 BCE to Dec 31, 262143 CE.
Also supports the conversion from ISO 8601 ordinal and week date. NaiveDateTime ISO 8601 combined date and time without timezone. NaiveTime ISO 8601 time without timezone.
Allows for the nanosecond precision and optional leap second representation. NaiveWeek A week represented by a NaiveDate
and a Weekday
which is the first
day of the week. OutOfRange Out of range error type used in various converting APIs OutOfRangeError Represents error when converting TimeDelta
to/from a standard library
implementation ParseError An error from the parse
function. ParseMonthError An error resulting from reading <Month>
value with FromStr
. ParseWeekdayError An error resulting from reading Weekday
value with FromStr
. TimeDelta Time duration with nanosecond precision. TimeRange The start_at and end_at bounds of the TimeRange are both inclusive. Utc The UTC time zone. This is the most efficient time zone when you don’t need the local time.
It is also used as an offset (which is also a dummy type). LocalResult Old name of MappedLocalTime
. See that type for more documentation. Month The month of the year. RoundingError An error from rounding by TimeDelta
SecondsFormat Specific formatting options for seconds. This may be extended in the
future, so exhaustive matching in external code is not recommended. Weekday The day of week. MAX_DATE Deprecated The maximum possible Date
. MAX_DATETIME Deprecated The maximum possible DateTime<Utc>
. MIN_DATE Deprecated The minimum possible Date
. MIN_DATETIME Deprecated The minimum possible DateTime<Utc>
. Datelike The common set of methods for date component. DurationRound Extension trait for rounding or truncating a DateTime by a TimeDelta. Offset The offset from the local time to UTC. SubsecRound Extension trait for subsecond rounding or truncation to a maximum number
of digits. Rounding can be used to decrease the error variance when
serializing/persisting to lower precision. Truncation is the default
behavior in Chrono display formatting. Either can be used to guarantee
equality (e.g. for testing) when round-tripping through a lower precision
format. TimeZone The time zone. Timelike The common set of methods for time component. Duration Alias of TimeDelta
. MappedLocalTime The result of mapping a local time to a concrete instant in a given time zone. ParseResult Same as Result<T, ParseError>
.