Struct cobalt::cobalt_model::DateTime [] [src]

pub struct DateTime(_);

Methods

impl DateTime
[src]

[src]

[src]

[src]

[src]

Methods from Deref<Target = DateTime<FixedOffset>>

[src]

Retrieves a date component.

[src]

Retrieves a time component. Unlike date, this is not associated to the time zone.

[src]

Returns the number of non-leap seconds since January 1, 1970 0:00:00 UTC (aka "UNIX timestamp").

[src]

Returns the number of milliseconds since the last second boundary

warning: in event of a leap second, this may exceed 999

note: this is not the number of milliseconds since January 1, 1970 0:00:00 UTC

[src]

Returns the number of microseconds since the last second boundary

warning: in event of a leap second, this may exceed 999_999

note: this is not the number of microseconds since January 1, 1970 0:00:00 UTC

[src]

Returns the number of nanoseconds since the last second boundary

warning: in event of a leap second, this may exceed 999_999_999

note: this is not the number of nanoseconds since January 1, 1970 0:00:00 UTC

[src]

Retrieves an associated offset from UTC.

[src]

Retrieves an associated time zone.

[src]

Changes the associated time zone. This does not change the actual DateTime (but will change the string representation).

[src]

Adds given Duration to the current date and time.

Returns None when it will result in overflow.

[src]

Subtracts given Duration from the current date and time.

Returns None when it will result in overflow.

[src]

Subtracts another DateTime from the current date and time. This does not overflow or underflow at all.

[src]

Returns a view to the naive UTC datetime.

[src]

Returns a view to the naive local datetime.

[src]

Returns an RFC 2822 date and time string such as Tue, 1 Jul 2003 10:52:37 +0200.

[src]

Returns an RFC 3339 and ISO 8601 date and time string such as 1996-12-19T16:39:57-08:00.

[src]

Formats the combined date and time with the specified formatting items.

[src]

Formats the combined date and time with the specified format string. See the format::strftime module on the supported escape sequences.

Trait Implementations

impl Copy for DateTime
[src]

impl Clone for DateTime
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for DateTime
[src]

[src]

Formats the value using the given formatter.

impl Eq for DateTime
[src]

impl PartialEq for DateTime
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl PartialOrd for DateTime
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for DateTime
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for DateTime
[src]

[src]

Returns the "default value" for a type. Read more

impl Deref for DateTime
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl DerefMut for DateTime
[src]

[src]

Mutably dereferences the value.

impl From<DateTime<FixedOffset>> for DateTime
[src]

[src]

Performs the conversion.

impl Datelike for DateTime
[src]

[src]

Returns the year number in the calendar date.

[src]

Returns the month number starting from 1. Read more

[src]

Returns the month number starting from 0. Read more

[src]

Returns the day of month starting from 1. Read more

[src]

Returns the day of month starting from 0. Read more

[src]

Returns the day of year starting from 1. Read more

[src]

Returns the day of year starting from 0. Read more

[src]

Returns the day of week.

[src]

Returns the ISO week.

[src]

Makes a new value with the year number changed. Read more

[src]

Makes a new value with the month number (starting from 1) changed. Read more

[src]

Makes a new value with the month number (starting from 0) changed. Read more

[src]

Makes a new value with the day of month (starting from 1) changed. Read more

[src]

Makes a new value with the day of month (starting from 0) changed. Read more

[src]

Makes a new value with the day of year (starting from 1) changed. Read more

[src]

Makes a new value with the day of year (starting from 0) changed. Read more

[src]

Returns the absolute year number starting from 1 with a boolean flag, which is false when the year predates the epoch (BCE/BC) and true otherwise (CE/AD). Read more

[src]

Returns the number of days since January 1, 1 (Day 1) in the proleptic Gregorian calendar.

impl Timelike for DateTime
[src]

[src]

Returns the hour number from 0 to 23.

[src]

Returns the minute number from 0 to 59.

[src]

Returns the second number from 0 to 59.

[src]

Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second. Read more

[src]

Makes a new value with the hour number changed. Read more

[src]

Makes a new value with the minute number changed. Read more

[src]

Makes a new value with the second number changed. Read more

[src]

Makes a new value with nanoseconds since the whole non-leap second changed. Read more

[src]

Returns the hour number from 1 to 12 with a boolean flag, which is false for AM and true for PM. Read more

[src]

Returns the number of non-leap seconds past the last midnight.

impl Serialize for DateTime
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl<'de> Deserialize<'de> for DateTime
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl From<DateTime> for DateTime
[src]

[src]

Performs the conversion.