Struct task_hookrs::date::Date [] [src]

pub struct Date(_);

Date is a NaiveDateTime-Wrapper object to be able to implement foreign traits on it

Methods from Deref<Target = NaiveDateTime>

Retrieves a date component.

Retrieves a time component.

Returns the number of non-leap seconds since the midnight on January 1, 1970.

Note that this does not account for the timezone! The true "UNIX timestamp" would count seconds since the midnight UTC on the epoch.

Returns the number of milliseconds since the last whole non-leap second.

The return value ranges from 0 to 999, or for leap seconds, to 1,999.

Returns the number of microseconds since the last whole non-leap second.

The return value ranges from 0 to 999,999, or for leap seconds, to 1,999,999.

Returns the number of nanoseconds since the last whole non-leap second.

The return value ranges from 0 to 999,999,999, or for leap seconds, to 1,999,999,999.

Deprecated: Same to NaiveDateTime::timestamp.

Adds given Duration to the current date and time.

Returns None when it will result in overflow.

Subtracts given Duration from the current date and time.

Returns None when it will result in overflow.

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

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

Trait Implementations

impl Clone for Date
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Date
[src]

Formats the value using the given formatter.

impl Hash for Date
[src]

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

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

impl Eq for Date
[src]

impl PartialEq for Date
[src]

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

This method tests for !=.

impl Deref for Date
[src]

The resulting type after dereferencing

The method called to dereference a value

impl DerefMut for Date
[src]

The method called to mutably dereference a value

impl From<NaiveDateTime> for Date
[src]

Performs the conversion.

impl Serialize for Date
[src]

Serialize this value into the given Serde serializer. Read more

impl Deserialize for Date
[src]

Deserialize this value from the given Serde deserializer. Read more