Struct hijri_date::HijriDate[][src]

pub struct HijriDate {
    pub day: usize,
    pub month: usize,
    pub month_len: usize,
    pub year: usize,
    pub day_name: String,
    pub month_name: String,
    pub day_gr: usize,
    pub month_gr: usize,
    pub year_gr: usize,
    pub day_name_en: String,
    pub month_name_en: String,
    // some fields omitted
}

Main structure.

  • Contains numeric value of hijri and gregorian dates plus hijri month and day names.
  • Hijri names dosent have suffix, example (day,month,year,..)
  • Gregorian names are denoted with gr or en suffix.

Fields

Methods

impl HijriDate
[src]

get data from hijri date

get data from gregorian date.

get data from today's date.

Returns a representation of HijriDate defined by the given formatter

       hijri

    %Y              hijri_year
    %m              hijri_month
    %d              hijri_day
    %D              hijri_day_name
    %M              hijri_month_name
    %l              hijri_month_len

       gregorian
     
    %gY             gregorian_year
    %gm             gregorian_month
    %gd             gregorian_day
    %gD             gregorian_day_name
    %gM             gregorian_month_name

Trait Implementations

impl Debug for HijriDate
[src]

Formats the value using the given formatter. Read more

impl PartialEq for HijriDate
[src]

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

This method tests for !=.

impl Display for HijriDate
[src]

Formats the value using the given formatter. Read more

impl Add<Duration> for HijriDate
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub<Duration> for HijriDate
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Sub<HijriDate> for HijriDate
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl PartialOrd for HijriDate
[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

Auto Trait Implementations

impl Send for HijriDate

impl Sync for HijriDate