INSDate

Trait INSDate 

Source
pub trait INSDate: PNSObject {
Show 17 methods // Provided methods fn m_date() -> Self where Self: Sized + FromId { ... } fn m_date_with_time_interval_since_now( time_interval: NSTimeInterval, ) -> Self where Self: Sized + FromId { ... } fn m_date_with_time_interval_since_date( secs_to_be_added: NSTimeInterval, date: NSDate, ) -> Self where Self: Sized + FromId { ... } fn m_date_with_time_interval_since_reference_date( secs_to_be_added: NSTimeInterval, ) -> Self where Self: Sized + FromId { ... } fn m_date_with_time_interval_since1970( secs_to_be_added: NSTimeInterval, ) -> Self where Self: Sized + FromId { ... } fn p_distant_future() -> NSDate { ... } fn p_distant_past() -> NSDate { ... } fn p_now() -> NSDate { ... } fn m_is_equal_to_date(&self, date: NSDate) -> bool { ... } fn m_earlier_date(&self, date: NSDate) -> Self where Self: Sized + FromId { ... } fn m_later_date(&self, date: NSDate) -> Self where Self: Sized + FromId { ... } fn m_compare(&self, date: NSDate) -> NSComparisonResult { ... } fn m_time_interval_since_date(&self, date: NSDate) -> NSTimeInterval { ... } fn p_time_interval_since_now(&self) -> NSTimeInterval { ... } fn p_time_interval_since_reference_date() -> NSTimeInterval { ... } fn p_time_interval_since_1970() -> NSTimeInterval { ... } fn m_date_by_adding_time_interval( &self, secs_to_be_added: NSTimeInterval, ) -> Self where Self: Sized + FromId { ... }
}
Expand description

A trait containing all the methods for NSDate

Provided Methods§

Source

fn m_date() -> Self
where Self: Sized + FromId,

Creates and returns a new date object set to the current date and time.

Source

fn m_date_with_time_interval_since_now(time_interval: NSTimeInterval) -> Self
where Self: Sized + FromId,

Creates and returns a date object set to a given number of seconds from the current date and time.

Source

fn m_date_with_time_interval_since_date( secs_to_be_added: NSTimeInterval, date: NSDate, ) -> Self
where Self: Sized + FromId,

Creates and returns a date object set to a given number of seconds from the specified date.

Source

fn m_date_with_time_interval_since_reference_date( secs_to_be_added: NSTimeInterval, ) -> Self
where Self: Sized + FromId,

Creates and returns a date object set to a given number of seconds from 00:00:00 UTC on 1 January 2001.

Source

fn m_date_with_time_interval_since1970(secs_to_be_added: NSTimeInterval) -> Self
where Self: Sized + FromId,

Creates and returns a date object set to the given number of seconds from 00:00:00 UTC on 1 January 1970.

Source

fn p_distant_future() -> NSDate

A date object representing a date in the distant future.

Source

fn p_distant_past() -> NSDate

A date object representing a date in the distant past.

Source

fn p_now() -> NSDate

The current date and time, as of the time of access.

Source

fn m_is_equal_to_date(&self, date: NSDate) -> bool

Returns a Boolean value that indicates whether a given object is a date that is exactly equal the receiver.

Source

fn m_earlier_date(&self, date: NSDate) -> Self
where Self: Sized + FromId,

Returns the earlier of the receiver and another given date.

Source

fn m_later_date(&self, date: NSDate) -> Self
where Self: Sized + FromId,

Returns the later of the receiver and another given date.

Source

fn m_compare(&self, date: NSDate) -> NSComparisonResult

Indicates the temporal ordering of the receiver and another given date.

Source

fn m_time_interval_since_date(&self, date: NSDate) -> NSTimeInterval

Returns the interval between the receiver and another given date.

Source

fn p_time_interval_since_now(&self) -> NSTimeInterval

The interval between the date object and the current date and time.

Source

fn p_time_interval_since_reference_date() -> NSTimeInterval

The interval between the date object and 00:00:00 UTC on 1 January 2001.

Source

fn p_time_interval_since_1970() -> NSTimeInterval

The interval between the date object and 00:00:00 UTC on 1 January 1970.

Source

fn m_date_by_adding_time_interval( &self, secs_to_be_added: NSTimeInterval, ) -> Self
where Self: Sized + FromId,

Returns a new date object that is set to a given number of seconds relative to the receiver.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§