Hebrew (Calendars v0.2.4) View Source

The Hebrew calendar module.

Link to this section Summary

Functions

Returns the month adar of the Hebrew calendar.

Returns the month adarii of the Hebrew calendar.

Adds the number of days to a fixed day or Hebrew date.

Returns the fixed date of Birkath Ha Hama of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns a fixed day or Hebrew date as a Hebrew date.

Returns a fixed day or Hebrew date as a fixed day.

Returns a fixed day or Hebrew date either as a fixed day or a Hebrew date.

Returns the month av of the Hebrew calendar.

Returns the fixed date of Birkath Ha Hama of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns a list of the Calixir functions of the Hebrew calendar.

Compares two Hebrew dates and returns...

Returns a Hebrew date from its fields year, month, day.

Returns the difference (= number of days) between two Hebrew dates.

Returns the day field of a Hebrew date.

Returns the ordinal day number of a fixed day or Hebrew date in the corresponding week.

Returns the number of days in the month of a fixed day or Hebrew date.

Returns the number of days in the month given by the Hebrew year and month.

Returns the number of days in a week of the Hebrew calendar.

Returns the number of days in the Hebrew year.

Returns the number of days remaing in the month after a fixed day or Hebrew date.

Returns the month elul of the Hebrew calendar.

Returns the last day of the month given by a fixed day or Hebrew date.

Returns the last day of the month given by the Hebrew year and month.

Returns the epoch of the Hebrew calendar.

Returns true if Hebrew date1 is equal Hebrew date2, otherwise false.

Returns the name of the field atom in a Hebrew date at field_index.

Returns a list of the field atoms (names) of a Hebrew date.

Returns the number of fields in a Hebrew date

Returns the index (= position) of the field_atom in a Hebrew date.

Converts the other_date of the other_calendar into the equivalent date of the Hebrew calendar.

Converts a fixed day to a Hebrew date.

Converts a Julian Day into the equivalent Hebrew date.

Converts a RataDie date into the equivalent Hebrew date.

Converts a Unix date into the equivalent Hebrew date.

Returns true if Hebrew date1 is greater (= later) than or equal Hebrew date2, otherwise false.

Returns true if Hebrew date1 is greater (= later) than Hebrew date2, otherwise false.

Returns the fixed date of Hanukkah of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns a list of the holidays of the Hebrew calendar.

Returns the month iyyar of the Hebrew calendar.

Returns the internal keyword of the Hebrew calendar.

Returns the month kislev of the Hebrew calendar.

Returns the last month of the Hebrew year given by a fixed day or a Hebrew date.

Returns true if Hebrew date1 is smaller (= earlier) than or equal Hebrew date2, otherwise false.

Returns true if the Hebrew year is a leap year, otherwise false.

Returns true if Hebrew date1 is smaller (= earlier) than Hebrew date2, otherwise false.

Returns the month marshevan of the Hebrew calendar.

Returns the module of the Hebrew calendar.

Returns the month field of a Hebrew date.

Returns a list of the months of the Hebrew calendar.

Returns the number of months in the Hebrew year.

Returns the internal name of the Hebrew calendar.

Returns the first date of the Hebrew year.

Returns the month nisan of the Hebrew calendar.

Returns the fixed date of Passover of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns the fixed date of Purim of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns the distance between two Hebrew dates as a range of fixed days.

Returns the fixed date of Sh'ela of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns the month shevat of the Hebrew calendar.

Returns the month sivan of the Hebrew calendar.

Returns the start of the day in the Hebrew calendar.

Returns the first day of the month given by a fixed day or Hebrew date.

Returns the first day of the month given by the Hebrew year and month.

Returns the fixed date of Ta'anit Esther of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns the month tammuz of the Hebrew calendar.

Returns the month tevet of the Hebrew calendar.

Returns the fixed date of Tisha be-Av of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns the month tishri of the Hebrew calendar.

Converts a Hebrew date into the equivalent date of the other_calendar.

Converts a Hebrew date tuple into a fixed day.

Converts a Hebrew date given by year, month, day into a fixed day.

Converts a Hebrew date into the equivalent Julian Day.

Converts a Hebrew date given by year, month, day into the equivalent Julian Day.

Converts a Hebrew date into the equivalent RataDie date.

Converts a Hebrew date given by year, month, day into the equivalent RataDie date.

Converts a Hebrew date into the equivalent Unix date.

Converts a Hebrew date given by year, month, day into the equivalent Unix date.

Returns the current date either as a fixed day or a Hebrew date.

Returns a list of the weekdays of the Hebrew calendar.

Returns the year field of a Hebrew date.

Returns the last date of the Hebrew year.

Returns the fixed date of Yom ha Zikkaron of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns the weekday yom_hamishi of the Hebrew calendar.

Returns the fixed date of Yom Kippur of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

Returns the weekday yom_revii of the Hebrew calendar.

Returns the weekday yom_rishon of the Hebrew calendar.

Returns the weekday yom_shabbat of the Hebrew calendar.

Returns the weekday yom_shelishi of the Hebrew calendar.

Returns the weekday yom_sheni of the Hebrew calendar.

Returns the weekday yom_shishi of the Hebrew calendar.

Link to this section Types

Specs

fixed() :: integer()

Specs

hebrew_date() :: {hebrew_year(), hebrew_month(), hebrew_day()}

Specs

hebrew_day() :: 1..30

Specs

hebrew_month() :: 1..13

Specs

hebrew_year() :: :integer

Specs

t() :: hebrew_date()

Link to this section Functions

Specs

adar(:integer | :name) :: integer()

Returns the month adar of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.adar()
  12
  iex>Elixir.Hebrew.adar(:integer)
  12
  iex>Elixir.Hebrew.adar(:name)
  "Adar"
Link to this function

adarii(type \\ :integer)

View Source

Specs

adarii(:integer | :name) :: integer()

Returns the month adarii of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.adarii()
  13
  iex>Elixir.Hebrew.adarii(:integer)
  13
  iex>Elixir.Hebrew.adarii(:name)
  "Adar II"
Link to this function

add_days(cal_date, days, type \\ :fixed)

View Source

Specs

add_days(fixed() | hebrew_date(), integer(), :fixed | :date) ::
  fixed() | hebrew_date()

Adds the number of days to a fixed day or Hebrew date.

If days is negative, the days will be subtracted.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.add_days(730739, 100)
  730839
  iex>Elixir.Hebrew.add_days(730739, -100)
  730639

  iex>Elixir.Hebrew.add_days(730739, 100, :fixed)
  730839
  iex>Elixir.Hebrew.add_days(730739, -100, :fixed)
  730639

  iex>Elixir.Hebrew.add_days(730739, 100, :date)
  {5762, 10, 5}
  iex>Elixir.Hebrew.add_days(730739, -100, :date)
  {5761, 3, 12}

  iex>Elixir.Hebrew.add_days({5761, 6, 23}, 100)
  730839
  iex>Elixir.Hebrew.add_days({5761, 6, 23}, -100)
  730639

  iex>Elixir.Hebrew.add_days({5761, 6, 23}, 100, :fixed)
  730839
  iex>Elixir.Hebrew.add_days({5761, 6, 23}, -100, :fixed)
  730639

  iex>Elixir.Hebrew.add_days({5761, 6, 23}, 100, :date)
  {5762, 10, 5}
  iex>Elixir.Hebrew.add_days({5761, 6, 23}, -100, :date)
  {5761, 3, 12}
Link to this function

alt_birkath_ha_hama(gregorian_year)

View Source

Specs

alt_birkath_ha_hama(Gregorian.gregorian_year()) :: fixed() | hebrew_date()

Returns the fixed date of Birkath Ha Hama of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.alt_birkath_ha_hama(2001)
  []

Specs

as_date(fixed() | hebrew_date()) :: hebrew_date()

Returns a fixed day or Hebrew date as a Hebrew date.

This is a convenience function to simplify certain function calls.

Examples

  iex>Elixir.Hebrew.as_date(730739)
  {5761, 6, 23}
  iex>Elixir.Hebrew.as_date({5761, 6, 23})
  {5761, 6, 23}

Specs

as_fixed(fixed() | hebrew_date()) :: fixed()

Returns a fixed day or Hebrew date as a fixed day.

This is a convenience function to simplify certain function calls.

Examples

  iex>Elixir.Hebrew.as_fixed(730739)
  730739
  iex>Elixir.Hebrew.as_fixed({5761, 6, 23})
  730739
Link to this function

as_type(cal_date, type \\ :fixed)

View Source

Specs

as_type(fixed() | hebrew_date(), :fixed | :date) :: fixed() | hebrew_date()

Returns a fixed day or Hebrew date either as a fixed day or a Hebrew date.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.as_type(730739)
  730739
  iex>Elixir.Hebrew.as_type(730739, :fixed)
  730739
  iex>Elixir.Hebrew.as_type(730739, :date)
  {5761, 6, 23}
  iex>Elixir.Hebrew.as_type({5761, 6, 23})
  730739
  iex>Elixir.Hebrew.as_type({5761, 6, 23}, :fixed)
  730739
  iex>Elixir.Hebrew.as_type({5761, 6, 23}, :date)
  {5761, 6, 23}

Specs

av(:integer | :name) :: integer()

Returns the month av of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.av()
  5
  iex>Elixir.Hebrew.av(:integer)
  5
  iex>Elixir.Hebrew.av(:name)
  "Av"
Link to this function

birkath_ha_hama(gregorian_year)

View Source

Specs

birkath_ha_hama(Gregorian.gregorian_year()) :: fixed() | hebrew_date()

Returns the fixed date of Birkath Ha Hama of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.birkath_ha_hama(2001)
  []
Link to this function

calixir_api(type \\ :atom)

View Source

Returns a list of the Calixir functions of the Hebrew calendar.

The type parameter determines the type of the returned Calixir function:

  • :atom returns the internal names of the functions (default),
  • :spec returns the complete specifications of the functions.

Examples

  iex>Elixir.Hebrew.calixir_api()
  [:hebrew_leap_year?, :last_month_of_hebrew_year, :hebrew_sabbatical_year?, :hebrew_epoch, :molad, :hebrew_calendar_elapsed_days, :hebrew_year_length_correction, :hebrew_new_year, :last_day_of_hebrew_month, :long_marhesvan?, :short_kislev?, :days_in_hebrew_year, :fixed_from_hebrew, :hebrew_from_fixed, :fixed_from_molad, :omer, :samuel_season_in_gregorian, :adda_season_in_gregorian, :hebrew_in_gregorian]
  iex>Elixir.Hebrew.calixir_api(:atom)
  [:hebrew_leap_year?, :last_month_of_hebrew_year, :hebrew_sabbatical_year?, :hebrew_epoch, :molad, :hebrew_calendar_elapsed_days, :hebrew_year_length_correction, :hebrew_new_year, :last_day_of_hebrew_month, :long_marhesvan?, :short_kislev?, :days_in_hebrew_year, :fixed_from_hebrew, :hebrew_from_fixed, :fixed_from_molad, :omer, :samuel_season_in_gregorian, :adda_season_in_gregorian, :hebrew_in_gregorian]
  iex>Elixir.Hebrew.calixir_api(:fun_specs)
  [[:hebrew_leap_year?, [:year]], [:last_month_of_hebrew_year, [:year]], [:hebrew_sabbatical_year?, [:year]], [:hebrew_epoch, []], [:molad, [:year, :month]], [:hebrew_calendar_elapsed_days, [:year]], [:hebrew_year_length_correction, [:year]], [:hebrew_new_year, [:year]], [:last_day_of_hebrew_month, [:year, :month]], [:long_marhesvan?, [:year]], [:short_kislev?, [:year]], [:days_in_hebrew_year, [:year]], [:fixed_from_hebrew, [:year, :month, :day]], [:hebrew_from_fixed, [:fixed]], [:fixed_from_molad, [:moon]], [:omer, [:fixed]], [:samuel_season_in_gregorian, [:season, :gregorian_year]], [:adda_season_in_gregorian, [:season, :gregorian_year]], [:hebrew_in_gregorian, [:month, :day, :gregorian_year]]]

Specs

compare(hebrew_date(), hebrew_date()) :: :lt | :eq | :gt

Compares two Hebrew dates and returns...

  • :lt if date1 is smaller (= earlier) than date2,
  • :eq if date1 is equal date2,
  • :gt if date1 is larger (= later) than date2.

Examples

  iex>Elixir.Hebrew.compare({5761, 6, 23}, {5761, 6, 23})
  :eq
  iex>Elixir.Hebrew.compare({5761, 6, 23}, {5762, 10, 5})
  :lt
  iex>Elixir.Hebrew.compare({5762, 10, 5}, {5761, 6, 23})
  :gt

Specs

date(hebrew_year(), hebrew_month(), hebrew_day()) :: t()

Returns a Hebrew date from its fields year, month, day.

Example

  iex>Elixir.Hebrew.date(5761, 6, 23)
  {5761, 6, 23}
Link to this function

date_diff(cal_date1, cal_date2)

View Source

Specs

date_diff(fixed() | hebrew_date(), fixed() | hebrew_date()) :: integer()

Returns the difference (= number of days) between two Hebrew dates.

The dates can be given as fixed days or Hebrew dates in arbitrary combination. The difference is calculated by date2 - date1.

If cal_date2 is larger (= later) than cal_date1 the result is positive.

If cal_date2 is smaller (= earlier) than cal_date1 the result is negative.

Examples

  iex>Elixir.Hebrew.date_diff(730739, 730839)
  100
  iex>Elixir.Hebrew.date_diff(730839, 730739)
  -100
  iex>Elixir.Hebrew.date_diff({5761, 6, 23}, {5762, 10, 5})
  100
  iex>Elixir.Hebrew.date_diff({5762, 10, 5}, {5761, 6, 23})
  -100
  iex>Elixir.Hebrew.date_diff(730739, {5762, 10, 5})
  100
  iex>Elixir.Hebrew.date_diff({5761, 6, 23}, 730839)
  100
Link to this function

day(cal_date, type \\ :value)

View Source

Specs

day(fixed() | hebrew_date(), :atom | :index | :name | :value) ::
  :atom | integer() | String.t() | number()

Returns the day field of a Hebrew date.

The type parameter determines the type of the returned day:

  • :atom returns the internal name of day,
  • :index returns the position of the day field within the date,
  • :name returns the common name of the day,
  • :value returns the value of the day (default).

Examples

  iex>Elixir.Hebrew.day(730739)
  23
  iex>Elixir.Hebrew.day(730739, :atom)
  :day
  iex>Elixir.Hebrew.day(730739, :index)
  2
  iex>Elixir.Hebrew.day(730739, :name)
  "Day"
  iex>Elixir.Hebrew.day(730739, :value)
  23

  iex>Elixir.Hebrew.day({5761, 6, 23})
  23
  iex>Elixir.Hebrew.day({5761, 6, 23}, :atom)
  :day
  iex>Elixir.Hebrew.day({5761, 6, 23}, :index)
  2
  iex>Elixir.Hebrew.day({5761, 6, 23}, :name)
  "Day"
  iex>Elixir.Hebrew.day({5761, 6, 23}, :value)
  23

Specs

day_of_week(fixed() | hebrew_date()) :: integer()

Returns the ordinal day number of a fixed day or Hebrew date in the corresponding week.

Examples

  iex>Elixir.Hebrew.day_of_week(730739)
  2
  iex>Elixir.Hebrew.day_of_week({5761, 6, 23})
  2

Specs

days_in_month(fixed() | hebrew_date()) :: integer()

Returns the number of days in the month of a fixed day or Hebrew date.

Examples

  iex>Elixir.Hebrew.days_in_month(730739)
  29
  iex>Elixir.Hebrew.days_in_month({5761, 6, 23})
  29
Link to this function

days_in_month(year, month)

View Source

Specs

days_in_month(hebrew_year(), hebrew_month()) :: integer()

Returns the number of days in the month given by the Hebrew year and month.

Example

  iex>Elixir.Hebrew.days_in_month(5761, 6)
  29

Specs

days_in_week() :: integer()

Returns the number of days in a week of the Hebrew calendar.

Example

  iex>Elixir.Hebrew.days_in_week()
  7

Specs

days_in_year(hebrew_year()) :: integer()

Returns the number of days in the Hebrew year.

Examples

  iex>Elixir.Hebrew.days_in_year(5760)
  385
  iex>Elixir.Hebrew.days_in_year(5761)
  353
Link to this function

days_remaining_in_month(cal_date)

View Source

Specs

days_remaining_in_month(fixed() | hebrew_date()) :: integer()

Returns the number of days remaing in the month after a fixed day or Hebrew date.

Examples

  iex>Elixir.Hebrew.days_remaining_in_month(730739)
  6
  iex>Elixir.Hebrew.days_remaining_in_month({5761, 6, 23})
  6

Specs

elul(:integer | :name) :: integer()

Returns the month elul of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.elul()
  6
  iex>Elixir.Hebrew.elul(:integer)
  6
  iex>Elixir.Hebrew.elul(:name)
  "Elul"
Link to this function

end_of_month(cal_date, type \\ :fixed)

View Source

Specs

end_of_month(fixed() | hebrew_date(), :fixed | :date) :: fixed() | hebrew_date()

Returns the last day of the month given by a fixed day or Hebrew date.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.end_of_month(730739)
  730745
  iex>Elixir.Hebrew.end_of_month(730739, :fixed)
  730745
  iex>Elixir.Hebrew.end_of_month(730739, :date)
  {5761, 6, 29}

  iex>Elixir.Hebrew.end_of_month({5761, 6, 29})
  730745
  iex>Elixir.Hebrew.end_of_month({5761, 6, 23}, :fixed)
  730745
  iex>Elixir.Hebrew.end_of_month({5761, 6, 23}, :date)
  {5761, 6, 29}
Link to this function

end_of_month(year, month, type)

View Source

Specs

end_of_month(hebrew_year(), hebrew_month(), :fixed | :date) ::
  fixed() | hebrew_date()

Returns the last day of the month given by the Hebrew year and month.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.end_of_month(5761, 6, :fixed)
  730745
  iex>Elixir.Hebrew.end_of_month(5761, 6, :date)
  {5761, 6, 29}

Specs

epoch() :: number()

Returns the epoch of the Hebrew calendar.

Example

  iex>Elixir.Hebrew.epoch()
  -1373427

Specs

Returns true if Hebrew date1 is equal Hebrew date2, otherwise false.

Examples

  iex>Elixir.Hebrew.eq({5761, 6, 23}, {5761, 6, 23})
  true
  iex>Elixir.Hebrew.eq({5761, 6, 23}, {5762, 10, 5})
  false
  iex>Elixir.Hebrew.eq({5762, 10, 5}, {5761, 6, 23})
  false

Specs

field_atom(integer()) :: atom()

Returns the name of the field atom in a Hebrew date at field_index.

Examples

  iex>Elixir.Hebrew.field_atom(0)
  :year
  iex>Elixir.Hebrew.field_atom(1)
  :month
  iex>Elixir.Hebrew.field_atom(2)
  :day

Specs

field_atoms() :: [atom()]

Returns a list of the field atoms (names) of a Hebrew date.

Example

  iex>Elixir.Hebrew.field_atoms()
  [:year, :month, :day]

Specs

field_count() :: integer()

Returns the number of fields in a Hebrew date

Example

  iex>Elixir.Hebrew.field_count()
  3

Specs

field_index(atom()) :: integer()

Returns the index (= position) of the field_atom in a Hebrew date.

Examples

  iex>Elixir.Hebrew.field_index(:year)
  0
  iex>Elixir.Hebrew.field_index(:month)
  1
  iex>Elixir.Hebrew.field_index(:day)
  2
Link to this function

from_date(other_date, other_calendar)

View Source

Specs

from_date(tuple(), module()) :: hebrew_date()
from_date(tuple(), module()) :: {:error, String.t()}

Converts the other_date of the other_calendar into the equivalent date of the Hebrew calendar.

Example

  iex>Elixir.Hebrew.from_date({2001, 9, 11}, Gregorian)
  {5761, 6, 23}

Specs

from_fixed(fixed()) :: hebrew_date()

Converts a fixed day to a Hebrew date.

Example

  iex>Elixir.Hebrew.from_fixed(730739)
  {5761, 6, 23}

Specs

from_jd(tuple() | number()) :: hebrew_date()

Converts a Julian Day into the equivalent Hebrew date.

The Julian Day can be given as a tuple or by a Julian day.

Examples

  iex>Elixir.Hebrew.from_jd({2452163.5})
  {5761, 6, 23}
  iex>Elixir.Hebrew.from_jd(2452163.5)
  {5761, 6, 23}

Specs

from_rata_die(tuple() | integer()) :: hebrew_date()

Converts a RataDie date into the equivalent Hebrew date.

The RataDie date can be given as a tuple or by a RataDie rd.

Examples

  iex>Elixir.Hebrew.from_rata_die({730739})
  {5761, 6, 23}
  iex>Elixir.Hebrew.from_rata_die(730739)
  {5761, 6, 23}

Specs

from_unix(tuple() | integer()) :: hebrew_date()

Converts a Unix date into the equivalent Hebrew date.

The Unix date can be given as a tuple or by Unix seconds.

Examples

  iex>Elixir.Hebrew.from_unix({1000166400})
  {5761, 6, 23}
  iex>Elixir.Hebrew.from_unix(1000166400)
  {5761, 6, 23}

Specs

Returns true if Hebrew date1 is greater (= later) than or equal Hebrew date2, otherwise false.

Examples

  iex>Elixir.Hebrew.ge({5761, 6, 23}, {5761, 6, 23})
  true
  iex>Elixir.Hebrew.ge({5761, 6, 23}, {5762, 10, 5})
  false
  iex>Elixir.Hebrew.ge({5762, 10, 5}, {5761, 6, 23})
  true

Specs

Returns true if Hebrew date1 is greater (= later) than Hebrew date2, otherwise false.

Examples

  iex>Elixir.Hebrew.gt({5761, 6, 23}, {5761, 6, 23})
  false
  iex>Elixir.Hebrew.gt({5761, 6, 23}, {5762, 10, 5})
  false
  iex>Elixir.Hebrew.gt({5762, 10, 5}, {5761, 6, 23})
  true
Link to this function

hanukkah(gregorian_year)

View Source

Specs

Returns the fixed date of Hanukkah of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.hanukkah(2001)
  {2001, 12, 10}

Returns a list of the holidays of the Hebrew calendar.

The type parameter determines the type of the returned holidays:

  • :atom returns the internal names of the holidays,
  • :name returns the common names of the holidays (default).

Examples

  iex>Elixir.Hebrew.holidays()
  ["Yom Kippur", "Passover", "Ta'anit Esther", "Purim", "Tisha be-Av", "Yom ha Zikkaron", "Sh'ela", "Birkath Ha Hama", "Birkath Ha Hama", "Hanukkah"]
  iex>Elixir.Hebrew.holidays(:atom)
  [:yom_kippur, :passover, :ta_anit_esther, :purim, :tishah_be_av, :yom_ha_zikkaron, :sh_ela, :birkath_ha_hama, :alt_birkath_ha_hama, :hanukkah]
  iex>Elixir.Hebrew.holidays(:name)
  ["Yom Kippur", "Passover", "Ta'anit Esther", "Purim", "Tisha be-Av", "Yom ha Zikkaron", "Sh'ela", "Birkath Ha Hama", "Birkath Ha Hama", "Hanukkah"]

Specs

iyyar(:integer | :name) :: integer()

Returns the month iyyar of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.iyyar()
  2
  iex>Elixir.Hebrew.iyyar(:integer)
  2
  iex>Elixir.Hebrew.iyyar(:name)
  "Iyyar"

Specs

keyword() :: atom()

Returns the internal keyword of the Hebrew calendar.

Example

  iex>Elixir.Hebrew.keyword()
  :hebrew
Link to this function

kislev(type \\ :integer)

View Source

Specs

kislev(:integer | :name) :: integer()

Returns the month kislev of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.kislev()
  9
  iex>Elixir.Hebrew.kislev(:integer)
  9
  iex>Elixir.Hebrew.kislev(:name)
  "Kislev"
Link to this function

last_month_of_year(cal_date, type \\ :integer)

View Source

Specs

last_month_of_year(fixed() | hebrew_date(), :fixed | :date) ::
  fixed() | hebrew_date()

Returns the last month of the Hebrew year given by a fixed day or a Hebrew date.

The type parameter determines the type of the returned month:

  • :atom returns the internal name of the month,
  • :integer returns the number of the month (default),
  • :name returns the common name of the month.

Examples

  iex>Elixir.Hebrew.last_month_of_year(730739)
  12
  iex>Elixir.Hebrew.last_month_of_year(730739, :atom)
  :adar
  iex>Elixir.Hebrew.last_month_of_year(730739, :integer)
  12
  iex>Elixir.Hebrew.last_month_of_year(730739, :name)
  "Adar"

  iex>Elixir.Hebrew.last_month_of_year({5761, 6, 23})
  12
  iex>Elixir.Hebrew.last_month_of_year({5761, 6, 23}, :atom)
  :adar
  iex>Elixir.Hebrew.last_month_of_year({5761, 6, 23}, :integer)
  12
  iex>Elixir.Hebrew.last_month_of_year({5761, 6, 23}, :name)
  "Adar"

Specs

Returns true if Hebrew date1 is smaller (= earlier) than or equal Hebrew date2, otherwise false.

Examples

  iex>Elixir.Hebrew.le({5761, 6, 23}, {5761, 6, 23})
  true
  iex>Elixir.Hebrew.le({5761, 6, 23}, {5762, 10, 5})
  true
  iex>Elixir.Hebrew.le({5762, 10, 5}, {5761, 6, 23})
  false

Specs

leap_year?(hebrew_year()) :: boolean()

Returns true if the Hebrew year is a leap year, otherwise false.

Examples

  iex>Elixir.Hebrew.leap_year?(5760)
  true
  iex>Elixir.Hebrew.leap_year?(5761)
  false
  iex>Elixir.Hebrew.leap_year?(5762)
  false
  iex>Elixir.Hebrew.leap_year?(5763)
  true

Specs

Returns true if Hebrew date1 is smaller (= earlier) than Hebrew date2, otherwise false.

Examples

  iex>Elixir.Hebrew.lt({5761, 6, 23}, {5761, 6, 23})
  false
  iex>Elixir.Hebrew.lt({5761, 6, 23}, {5762, 10, 5})
  true
  iex>Elixir.Hebrew.lt({5762, 10, 5}, {5761, 6, 23})
  false
Link to this function

marshevan(type \\ :integer)

View Source

Specs

marshevan(:integer | :name) :: integer()

Returns the month marshevan of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.marshevan()
  8
  iex>Elixir.Hebrew.marshevan(:integer)
  8
  iex>Elixir.Hebrew.marshevan(:name)
  "Kheshvan"

Specs

module() :: module()

Returns the module of the Hebrew calendar.

Example

  iex>Elixir.Hebrew.module()
  Hebrew
Link to this function

month(cal_date, type \\ :value)

View Source

Specs

month(fixed() | hebrew_date(), :atom | :index | :name | :value) ::
  :atom | integer() | String.t() | number()

Returns the month field of a Hebrew date.

The type parameter determines the type of the returned month:

  • :atom returns the internal name of month,
  • :index returns the position of the month field within the date,
  • :name returns the common name of the month,
  • :value returns the value of the month (default).

Examples

  iex>Elixir.Hebrew.month(730739)
  6
  iex>Elixir.Hebrew.month(730739, :atom)
  :month
  iex>Elixir.Hebrew.month(730739, :index)
  1
  iex>Elixir.Hebrew.month(730739, :name)
  "Month"
  iex>Elixir.Hebrew.month(730739, :value)
  6

  iex>Elixir.Hebrew.month({5761, 6, 23})
  6
  iex>Elixir.Hebrew.month({5761, 6, 23}, :atom)
  :month
  iex>Elixir.Hebrew.month({5761, 6, 23}, :index)
  1
  iex>Elixir.Hebrew.month({5761, 6, 23}, :name)
  "Month"
  iex>Elixir.Hebrew.month({5761, 6, 23}, :value)
  6

Specs

months(:atom | :integer | :name) :: [integer() | atom() | String.t()]

Returns a list of the months of the Hebrew calendar.

The type parameter determines the type of the returned months:

  • :integer returns the numbers of the months,
  • :atom returns the internal names of the months,
  • :name returns the common names of the months (default).

Examples

  iex>Elixir.Hebrew.months()
  ["Nisan", "Iyyar", "Sivan", "Tammuz", "Av", "Elul", "Tishri", "Kheshvan", "Kislev", "Tevet", "Shevat", "Adar", "Adar II"]
  iex>Elixir.Hebrew.months(:integer)
  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
  iex>Elixir.Hebrew.months(:atom)
  [:nisan, :iyyar, :sivan, :tammuz, :av, :elul, :tishri, :marshevan, :kislev, :tevet, :shevat, :adar, :adarii]
  iex>Elixir.Hebrew.months(:name)
  ["Nisan", "Iyyar", "Sivan", "Tammuz", "Av", "Elul", "Tishri", "Kheshvan", "Kislev", "Tevet", "Shevat", "Adar", "Adar II"]

Specs

months_in_year(hebrew_year()) :: integer()

Returns the number of months in the Hebrew year.

Example

  iex>Elixir.Hebrew.months_in_year(730739)
  12

Specs

name() :: atom()

Returns the internal name of the Hebrew calendar.

Example

  iex>Elixir.Hebrew.name()
  "Hebrew"
Link to this function

new_year(year, type \\ :fixed)

View Source

Specs

new_year(hebrew_year(), :fixed | :date) :: fixed() | hebrew_date()

Returns the first date of the Hebrew year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.new_year(5761)
  730393
  iex>Elixir.Hebrew.new_year(5761, :fixed)
  730393
  iex>Elixir.Hebrew.new_year(5761, :date)
  {5761, 7, 1}

Specs

nisan(:integer | :name) :: integer()

Returns the month nisan of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.nisan()
  1
  iex>Elixir.Hebrew.nisan(:integer)
  1
  iex>Elixir.Hebrew.nisan(:name)
  "Nisan"
Link to this function

passover(gregorian_year)

View Source

Specs

Returns the fixed date of Passover of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.passover(2001)
  {2001, 4, 8}

Specs

Returns the fixed date of Purim of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.purim(2001)
  {2001, 3, 9}

Specs

range(hebrew_date(), hebrew_date()) :: integer()

Returns the distance between two Hebrew dates as a range of fixed days.

Example

  iex>Elixir.Hebrew.range({5761, 6, 23}, {5762, 10, 5})
  730739..730839

Specs

Returns the fixed date of Sh'ela of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.sh_ela(2001)
  {2001, 12, 5}
Link to this function

shevat(type \\ :integer)

View Source

Specs

shevat(:integer | :name) :: integer()

Returns the month shevat of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.shevat()
  11
  iex>Elixir.Hebrew.shevat(:integer)
  11
  iex>Elixir.Hebrew.shevat(:name)
  "Shevat"

Specs

sivan(:integer | :name) :: integer()

Returns the month sivan of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.sivan()
  3
  iex>Elixir.Hebrew.sivan(:integer)
  3
  iex>Elixir.Hebrew.sivan(:name)
  "Sivan"

Specs

start_of_day() :: :midnight | :sunset | :sunrise | :noon

Returns the start of the day in the Hebrew calendar.

Possible return values are:

  • :midnight,
  • :noon,
  • :sunrise,
  • :sunset,

Example

  iex>Elixir.Hebrew.start_of_day()
  :midnight
Link to this function

start_of_month(cal_date, type \\ :fixed)

View Source

Specs

start_of_month(fixed() | hebrew_date(), :fixed | :date) ::
  fixed() | hebrew_date()

Returns the first day of the month given by a fixed day or Hebrew date.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.start_of_month(730717)
  730717
  iex>Elixir.Hebrew.start_of_month(730717, :fixed)
  730717
  iex>Elixir.Hebrew.start_of_month(730717, :date)
  {5761, 6, 1}

  iex>Elixir.Hebrew.start_of_month({5761, 6, 1})
  730717
  iex>Elixir.Hebrew.start_of_month({5761, 6, 1}, :fixed)
  730717
  iex>Elixir.Hebrew.start_of_month({5761, 6, 1}, :date)
  {5761, 6, 1}
Link to this function

start_of_month(year, month, type)

View Source

Specs

start_of_month(hebrew_year(), hebrew_month(), :fixed | :date) ::
  fixed() | hebrew_date()

Returns the first day of the month given by the Hebrew year and month.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.start_of_month(5761, 6, :fixed)
  730717
  iex>Elixir.Hebrew.start_of_month(5761, 6, :date)
  {5761, 6, 1}
Link to this function

ta_anit_esther(gregorian_year)

View Source

Specs

ta_anit_esther(Gregorian.gregorian_year()) :: fixed() | hebrew_date()

Returns the fixed date of Ta'anit Esther of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.ta_anit_esther(2001)
  {2001, 3, 8}
Link to this function

tammuz(type \\ :integer)

View Source

Specs

tammuz(:integer | :name) :: integer()

Returns the month tammuz of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.tammuz()
  4
  iex>Elixir.Hebrew.tammuz(:integer)
  4
  iex>Elixir.Hebrew.tammuz(:name)
  "Tammuz"

Specs

tevet(:integer | :name) :: integer()

Returns the month tevet of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.tevet()
  10
  iex>Elixir.Hebrew.tevet(:integer)
  10
  iex>Elixir.Hebrew.tevet(:name)
  "Tevet"
Link to this function

tishah_be_av(gregorian_year)

View Source

Specs

tishah_be_av(Gregorian.gregorian_year()) :: fixed() | hebrew_date()

Returns the fixed date of Tisha be-Av of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.tishah_be_av(2001)
  {2001, 7, 29}
Link to this function

tishri(type \\ :integer)

View Source

Specs

tishri(:integer | :name) :: integer()

Returns the month tishri of the Hebrew calendar.

The type parameter determines the type of the returned month:

  • :integer returns the number of the month (default),
  • :name returns the name of the month.

Examples

  iex>Elixir.Hebrew.tishri()
  7
  iex>Elixir.Hebrew.tishri(:integer)
  7
  iex>Elixir.Hebrew.tishri(:name)
  "Tishri"
Link to this function

to_date(date, other_calendar)

View Source

Specs

to_date(hebrew_date(), module()) :: tuple()

Converts a Hebrew date into the equivalent date of the other_calendar.

For the following example to work the Gregorian calendar must be available.

Example

  iex>Elixir.Hebrew.to_date({5761, 6, 23}, Gregorian)
  {2001, 9, 11}

Specs

to_fixed(hebrew_date()) :: fixed()

Converts a Hebrew date tuple into a fixed day.

Example

  iex>Elixir.Hebrew.to_fixed({5761, 6, 23})
  730739
Link to this function

to_fixed(year, month, day)

View Source

Specs

to_fixed(hebrew_year(), hebrew_month(), hebrew_day()) :: fixed()

Converts a Hebrew date given by year, month, day into a fixed day.

Example

  iex>Elixir.Hebrew.to_fixed(5761, 6, 23)
  730739

Specs

to_jd(hebrew_date()) :: {number()}

Converts a Hebrew date into the equivalent Julian Day.

Example

  iex>Elixir.Hebrew.to_jd({5761, 6, 23})
  {2452163.5}

Specs

to_jd(hebrew_year(), hebrew_month(), hebrew_day()) :: {number()}

Converts a Hebrew date given by year, month, day into the equivalent Julian Day.

Example

  iex>Elixir.Hebrew.to_jd(5761, 6, 23)
  {2452163.5}

Specs

to_rata_die(hebrew_date()) :: {integer()}

Converts a Hebrew date into the equivalent RataDie date.

Example

  iex>Elixir.Hebrew.to_rata_die({5761, 6, 23})
  {730739}
Link to this function

to_rata_die(year, month, day)

View Source

Specs

to_rata_die(hebrew_year(), hebrew_month(), hebrew_day()) :: {integer()}

Converts a Hebrew date given by year, month, day into the equivalent RataDie date.

Example

  iex>Elixir.Hebrew.to_rata_die(5761, 6, 23)
  {730739}

Specs

to_unix(hebrew_date()) :: {integer()}

Converts a Hebrew date into the equivalent Unix date.

Example

  iex>Elixir.Hebrew.to_unix({5761, 6, 23})
  {1000166400}
Link to this function

to_unix(year, month, day)

View Source

Specs

to_unix(hebrew_year(), hebrew_month(), hebrew_day()) :: {integer()}

Converts a Hebrew date given by year, month, day into the equivalent Unix date.

Example

  iex>Elixir.Hebrew.to_unix(5761, 6, 23)
  {1000166400}

Specs

today(:fixed | :date) :: fixed() | hebrew_date()

Returns the current date either as a fixed day or a Hebrew date.

(This cannot be doctested, because today is a moving target.)

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  Elixir.Hebrew.today()
  730739
  Elixir.Hebrew.today(:fixed)
  730739
  Elixir.Hebrew.today(:date)
  {5761, 6, 23}

Returns a list of the weekdays of the Hebrew calendar.

The type parameter determines the type of the returned weekdays:

  • :integer returns the numbers of the weekdays,
  • :atom returns the internal names of the weekdays,
  • :name returns the common names of the weekdays (default).

Examples

  iex>Elixir.Hebrew.weekdays()
  ["Yom Rishon", "Yom Sheni", "Yom Shlishi", "Yom Revi-ee", "Yom Chamishi", "Yom Shishi", "Shabbat"]
  iex>Elixir.Hebrew.weekdays(:integer)
  [0, 1, 2, 3, 4, 5, 6]
  iex>Elixir.Hebrew.weekdays(:atom)
  [:yom_rishon, :yom_sheni, :yom_shelishi, :yom_revii, :yom_hamishi, :yom_shishi, :yom_shabbat]
  iex>Elixir.Hebrew.weekdays(:name)
  ["Yom Rishon", "Yom Sheni", "Yom Shlishi", "Yom Revi-ee", "Yom Chamishi", "Yom Shishi", "Shabbat"]
Link to this function

year(cal_date, type \\ :value)

View Source

Specs

year(fixed() | hebrew_date(), :atom | :index | :name | :value) ::
  :atom | integer() | String.t() | number()

Returns the year field of a Hebrew date.

The type parameter determines the type of the returned year:

  • :atom returns the internal name of year,
  • :index returns the position of the year field within the date,
  • :name returns the common name of the year,
  • :value returns the value of the year (default).

Examples

  iex>Elixir.Hebrew.year(730739)
  5761
  iex>Elixir.Hebrew.year(730739, :atom)
  :year
  iex>Elixir.Hebrew.year(730739, :index)
  0
  iex>Elixir.Hebrew.year(730739, :name)
  "Year"
  iex>Elixir.Hebrew.year(730739, :value)
  5761

  iex>Elixir.Hebrew.year({5761, 6, 23})
  5761
  iex>Elixir.Hebrew.year({5761, 6, 23}, :atom)
  :year
  iex>Elixir.Hebrew.year({5761, 6, 23}, :index)
  0
  iex>Elixir.Hebrew.year({5761, 6, 23}, :name)
  "Year"
  iex>Elixir.Hebrew.year({5761, 6, 23}, :value)
  5761
Link to this function

year_end(year, type \\ :fixed)

View Source

Specs

year_end(hebrew_year(), :fixed | :date) :: fixed() | hebrew_date()

Returns the last date of the Hebrew year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Examples

  iex>Elixir.Hebrew.year_end(5761)
  731098
  iex>Elixir.Hebrew.year_end(5761, :fixed)
  731098
  iex>Elixir.Hebrew.year_end(5761, :date)
  {5762, 6, 28}
Link to this function

yom_ha_zikkaron(gregorian_year)

View Source

Specs

yom_ha_zikkaron(Gregorian.gregorian_year()) :: fixed() | hebrew_date()

Returns the fixed date of Yom ha Zikkaron of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.yom_ha_zikkaron(2001)
  {2001, 4, 25}
Link to this function

yom_hamishi(type \\ :integer)

View Source

Specs

yom_hamishi(:integer | :name) :: integer()

Returns the weekday yom_hamishi of the Hebrew calendar.

The type parameter determines the type of the returned weekday:

  • :integer returns the number of the weekday (default),
  • :name returns the name of the weekday.

Examples

  iex>Elixir.Hebrew.yom_hamishi()
  4
  iex>Elixir.Hebrew.yom_hamishi(:integer)
  4
  iex>Elixir.Hebrew.yom_hamishi(:name)
  "Yom Chamishi"
Link to this function

yom_kippur(gregorian_year)

View Source

Specs

yom_kippur(Gregorian.gregorian_year()) :: fixed() | hebrew_date()

Returns the fixed date of Yom Kippur of the Hebrew calendar in the given gregorian_year or [], if there is no such holiday in that year.

The type parameter determines the type of the returned value:

  • :fixed returns a fixed day (default),
  • :date returns a Hebrew date.

Example

  iex>Elixir.Hebrew.yom_kippur(2001)
  {2001, 9, 27}
Link to this function

yom_revii(type \\ :integer)

View Source

Specs

yom_revii(:integer | :name) :: integer()

Returns the weekday yom_revii of the Hebrew calendar.

The type parameter determines the type of the returned weekday:

  • :integer returns the number of the weekday (default),
  • :name returns the name of the weekday.

Examples

  iex>Elixir.Hebrew.yom_revii()
  3
  iex>Elixir.Hebrew.yom_revii(:integer)
  3
  iex>Elixir.Hebrew.yom_revii(:name)
  "Yom Revi-ee"
Link to this function

yom_rishon(type \\ :integer)

View Source

Specs

yom_rishon(:integer | :name) :: integer()

Returns the weekday yom_rishon of the Hebrew calendar.

The type parameter determines the type of the returned weekday:

  • :integer returns the number of the weekday (default),
  • :name returns the name of the weekday.

Examples

  iex>Elixir.Hebrew.yom_rishon()
  0
  iex>Elixir.Hebrew.yom_rishon(:integer)
  0
  iex>Elixir.Hebrew.yom_rishon(:name)
  "Yom Rishon"
Link to this function

yom_shabbat(type \\ :integer)

View Source

Specs

yom_shabbat(:integer | :name) :: integer()

Returns the weekday yom_shabbat of the Hebrew calendar.

The type parameter determines the type of the returned weekday:

  • :integer returns the number of the weekday (default),
  • :name returns the name of the weekday.

Examples

  iex>Elixir.Hebrew.yom_shabbat()
  6
  iex>Elixir.Hebrew.yom_shabbat(:integer)
  6
  iex>Elixir.Hebrew.yom_shabbat(:name)
  "Shabbat"
Link to this function

yom_shelishi(type \\ :integer)

View Source

Specs

yom_shelishi(:integer | :name) :: integer()

Returns the weekday yom_shelishi of the Hebrew calendar.

The type parameter determines the type of the returned weekday:

  • :integer returns the number of the weekday (default),
  • :name returns the name of the weekday.

Examples

  iex>Elixir.Hebrew.yom_shelishi()
  2
  iex>Elixir.Hebrew.yom_shelishi(:integer)
  2
  iex>Elixir.Hebrew.yom_shelishi(:name)
  "Yom Shlishi"
Link to this function

yom_sheni(type \\ :integer)

View Source

Specs

yom_sheni(:integer | :name) :: integer()

Returns the weekday yom_sheni of the Hebrew calendar.

The type parameter determines the type of the returned weekday:

  • :integer returns the number of the weekday (default),
  • :name returns the name of the weekday.

Examples

  iex>Elixir.Hebrew.yom_sheni()
  1
  iex>Elixir.Hebrew.yom_sheni(:integer)
  1
  iex>Elixir.Hebrew.yom_sheni(:name)
  "Yom Sheni"
Link to this function

yom_shishi(type \\ :integer)

View Source

Specs

yom_shishi(:integer | :name) :: integer()

Returns the weekday yom_shishi of the Hebrew calendar.

The type parameter determines the type of the returned weekday:

  • :integer returns the number of the weekday (default),
  • :name returns the name of the weekday.

Examples

  iex>Elixir.Hebrew.yom_shishi()
  5
  iex>Elixir.Hebrew.yom_shishi(:integer)
  5
  iex>Elixir.Hebrew.yom_shishi(:name)
  "Yom Shishi"