[][src]Struct billecta::DateTime

pub struct DateTime(_);

A Datetime using Stockholm as TZ. Either CET or CEST.

Methods

impl DateTime[src]

pub fn ymd_hms(
    year: i32,
    month: u32,
    day: u32,
    hour: u32,
    minute: u32,
    second: u32
) -> Self
[src]

Crates a Datetime. Sets the millisecondpart to 0.

pub fn ymd(year: i32, month: u32, day: u32) -> Self[src]

Creates a DateTime from a date where the time part is set to 00:00:00:000

pub fn and_hms(&self, hour: u32, minute: u32, second: u32) -> Self[src]

Creates a new DateTime using the Date part of self and the time part created using the given hour, minute and second. Millis is set to 0.

pub fn year(&self) -> i32[src]

pub fn month(&self) -> u32[src]

pub fn date(&self) -> NaiveDate[src]

pub fn utc(&self) -> DateTime<Utc>[src]

pub fn prev_month_start(&self) -> Self[src]

Returns the start of the day in the month before.

pub fn now() -> Self[src]

pub fn days_in_month(&self) -> u32[src]

Returns the total number of days in this month.

pub fn month_name(&self) -> &'static str[src]

pub fn end_of_month(&self) -> DateTime[src]

Returns the last day of the month with time part 23:59:59:999

pub fn beginning_of_month(&self) -> DateTime[src]

Returns the first day of the month with time part 00:00:00:000

Trait Implementations

impl Add<Duration> for DateTime[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Duration> for DateTime[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for DateTime[src]

impl Copy for DateTime[src]

impl Debug for DateTime[src]

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

impl Display for DateTime[src]

impl Eq for DateTime[src]

impl From<NaiveDateTime> for DateTime[src]

impl Ord for DateTime[src]

impl PartialEq<DateTime> for DateTime[src]

impl PartialOrd<DateTime> for DateTime[src]

impl Serialize for DateTime[src]

impl StructuralEq for DateTime[src]

impl StructuralPartialEq for DateTime[src]

impl Sub<Duration> for DateTime[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<Duration> for DateTime[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.