Struct ptime::Tm [] [src]

pub struct Tm {
    pub tm_sec: i32,
    pub tm_min: i32,
    pub tm_hour: i32,
    pub tm_mday: i32,
    pub tm_mon: i32,
    pub tm_year: i32,
    pub tm_wday: i32,
    pub tm_yday: i32,
    pub tm_isdst: i32,
    pub tm_utcoff: i32,
    pub tm_nsec: i32,
}

Represents the components of a moment in time in Persian Calendar.

Fields

The same as tm_sec of time::Tm

The same as tm_min of time::Tm

The same as tm_hour of time::Tm

MonthDay - [1, 31]

Month since Farvardin - [0, 11]

Year

Weekday since Shanbe - [0, 6]. 0 = Shanbeh, ..., 6 = Jomeh.

YearDay since Farvardin 1 - [0, 365]

The same as tm_isdst of time::Tm

The same as tm_utcoff of time::Tm

The same as tm_nsec of time::Tm

Methods

impl Tm
[src]

Converts Persian calendar to Gregorian calendar

Returns the number of seconds since January 1, 1970 UTC

Returns true if the year is a leap year

Convert time to the local timezone

Convert time to the UTC

Returns the formatted representation of time yyyy, yyy, y year (e.g. 1394) yy 2-digits representation of year (e.g. 94) MMM the Persian name of month (e.g. فروردین) MM 2-digits representation of month (e.g. 01) M month (e.g. 1) DD day of year (starting from 1) D day of year (starting from 0) dd 2-digits representation of day (e.g. 01) d day (e.g. 1) E the Persian name of weekday (e.g. شنبه) e the Persian short name of weekday (e.g. ش) A the Persian name of 12-Hour marker (e.g. قبل از ظهر) a the Persian short name of 12-Hour marker (e.g. ق.ظ) HH 2-digits representation of hour [00-23] H hour [0-23] kk 2-digits representation of hour [01-24] k hour [1-24] hh 2-digits representation of hour [01-12] h hour [1-12] KK 2-digits representation of hour [00-11] K hour [0-11] mm 2-digits representation of minute [00-59] m minute [0-59] ss 2-digits representation of seconds [00-59] s seconds [0-59] ns nanoseconds

Trait Implementations

impl Copy for Tm
[src]

impl Clone for Tm
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Tm
[src]

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

This method tests for !=.

impl Eq for Tm
[src]

impl Debug for Tm
[src]

Formats the value using the given formatter.

impl Hash for Tm
[src]

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

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

impl Display for Tm
[src]

Formats the value using the given formatter. Read more

impl Add<Duration> for Tm
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<Duration> for Tm
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<Tm> for Tm
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<Tm> for Tm
[src]

The resulting type after applying the - operator

The method for the - operator

impl PartialOrd for Tm
[src]

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

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

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

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

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

impl Ord for Tm
[src]

This method returns an Ordering between self and other. Read more