Struct rhit::Date [−][src]
Expand description
a not precise date, only valid in the context of the local set of log files. It’s implicitely in the timezone of the log files (assuming all the files have the same one). As nginx didn’t exist before JC, a u16 is good enough for the year.
Fields
year: u16
month: u8
day: u8
Implementations
parse the date part of a nginx datetime.
a datetime in nginx is either in
- “common log format”, eg
10/Jan/2021:10:27:01 +0000
- ISO 8601, eg
1977-04-22T01:00:00-05:00
pub fn with_implicit(
s: &str,
default_year: Option<u16>,
default_month: Option<u8>
) -> Result<Self, DateParseError>
pub fn with_implicit(
s: &str,
default_year: Option<u16>,
default_month: Option<u8>
) -> Result<Self, DateParseError>
parse a numeric date with optionally implicit parts The part separator is the ‘/’
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Date
impl UnwindSafe for Date
Blanket Implementations
Mutably borrows from an owned value. Read more