pub struct DateTimeBuilder<'a> { /* private fields */ }Expand description
Builder for datetime operations.
This builder provides a fluent interface for creating datetime operations such as current time, date formatting, parsing, etc.
Implementations§
Source§impl<'a> DateTimeBuilder<'a>
impl<'a> DateTimeBuilder<'a>
Sourcepub fn now_op(&self) -> Logic<'a>
pub fn now_op(&self) -> Logic<'a>
Creates a now operation that returns the current date and time.
Sourcepub fn parse_date_op<S, F>(&self, date_str: S, format: F) -> Logic<'a>
pub fn parse_date_op<S, F>(&self, date_str: S, format: F) -> Logic<'a>
Creates a parse_date operation that parses a date string according to a format.
Sourcepub fn parse_date(&self, date_str: &str, format: &str) -> Logic<'a>
pub fn parse_date(&self, date_str: &str, format: &str) -> Logic<'a>
Creates a parse_date operation with string literals.
Sourcepub fn format_date_op<D, F>(&self, date: D, format: F) -> Logic<'a>
pub fn format_date_op<D, F>(&self, date: D, format: F) -> Logic<'a>
Creates a format_date operation that formats a date according to a format string.
Sourcepub fn date_diff_op<D1, D2, U>(
&self,
date1: D1,
date2: D2,
unit: U,
) -> Logic<'a>
pub fn date_diff_op<D1, D2, U>( &self, date1: D1, date2: D2, unit: U, ) -> Logic<'a>
Creates a date_diff operation that calculates the difference between two dates.
Auto Trait Implementations§
impl<'a> Freeze for DateTimeBuilder<'a>
impl<'a> !RefUnwindSafe for DateTimeBuilder<'a>
impl<'a> !Send for DateTimeBuilder<'a>
impl<'a> !Sync for DateTimeBuilder<'a>
impl<'a> Unpin for DateTimeBuilder<'a>
impl<'a> !UnwindSafe for DateTimeBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more