BaliPawukon (Calendars v0.2.4) View Source
The BaliPawukon calendar module.
This is a cyclical calendar. So it is not possible to convert a 'date' of this calendar into a corresponding date of a monotonic or another cyclical calendar.
Link to this section Summary
Functions
Returns a fixed day or BaliPawukon date as a BaliPawukon date.
Returns the asatawara field of a BaliPawukon date.
Returns the caturwara field of a BaliPawukon date.
Returns the dasawara field of a BaliPawukon date.
Returns a BaliPawukon date from its fields luang, dwiwara, triwara, caturwara, pancawara, sadwara, saptawara, asatawara, sangawara, dasawara.
Returns the dwiwara field of a BaliPawukon date.
Returns the epoch of the BaliPawukon calendar.
Returns the name of the field atom in a BaliPawukon date at field_index.
Returns a list of the field atoms (names) of a BaliPawukon date.
Returns the number of fields in a BaliPawukon date
Returns the index (= position) of the field_atom in a BaliPawukon date.
Converts the other_date of the other_calendar into the equivalent date of the BaliPawukon calendar.
Converts a fixed day to a BaliPawukon date.
Converts a Julian Day into the equivalent BaliPawukon date.
Converts a RataDie date into the equivalent BaliPawukon date.
Converts a Unix date into the equivalent BaliPawukon date.
Returns a list of the holidays of the BaliPawukon calendar.
Returns the fixed date of Kajeng Keliwon (first) of the
BaliPawukon calendar in the given gregorian_year or [],
if there is no such holiday in that year.
Returns the internal keyword of the BaliPawukon calendar.
Returns the luang field of a BaliPawukon date.
Returns the module of the BaliPawukon calendar.
Returns the internal name of the BaliPawukon calendar.
Returns the pancawara field of a BaliPawukon date.
Returns the sadwara field of a BaliPawukon date.
Returns the sangawara field of a BaliPawukon date.
Returns the saptawara field of a BaliPawukon date.
Returns the triwara field of a BaliPawukon date.
Returns the fixed date of Tumpek (first) of the
BaliPawukon calendar in the given gregorian_year or [],
if there is no such holiday in that year.
Link to this section Types
Specs
bali_pawukon_asatawara() :: integer()
Specs
bali_pawukon_caturwara() :: integer()
Specs
bali_pawukon_dasawara() :: integer()
Specs
bali_pawukon_date() ::
{bali_pawukon_luang(), bali_pawukon_dwiwara(), bali_pawukon_triwara(),
bali_pawukon_caturwara(), bali_pawukon_pancawara(), bali_pawukon_sadwara(),
bali_pawukon_saptawara(), bali_pawukon_asatawara(), bali_pawukon_sangawara(),
bali_pawukon_dasawara()}
Specs
bali_pawukon_dwiwara() :: integer()
Specs
bali_pawukon_luang() :: boolean()
Specs
bali_pawukon_pancawara() :: integer()
Specs
bali_pawukon_sadwara() :: integer()
Specs
bali_pawukon_sangawara() :: integer()
Specs
bali_pawukon_saptawara() :: integer()
Specs
bali_pawukon_triwara() :: integer()
Specs
fixed() :: integer()
Specs
t() :: bali_pawukon_date()
Link to this section Functions
Specs
as_date(fixed() | bali_pawukon_date()) :: bali_pawukon_date()
Returns a fixed day or BaliPawukon date as a BaliPawukon date.
This is a convenience function to simplify certain function calls.
Examples
iex>Elixir.BaliPawukon.as_date(730739)
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2}
iex>Elixir.BaliPawukon.as_date({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2} Specs
asatawara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the asatawara field of a BaliPawukon date.
The type parameter determines the type of the returned asatawara:
:atomreturns the internal name of asatawara,:indexreturns the position of the asatawara field within the date,:namereturns the common name of the asatawara,:valuereturns the value of the asatawara (default).
Examples
iex>Elixir.BaliPawukon.asatawara(730739)
3
iex>Elixir.BaliPawukon.asatawara(730739, :atom)
:asatawara
iex>Elixir.BaliPawukon.asatawara(730739, :index)
7
iex>Elixir.BaliPawukon.asatawara(730739, :name)
"Asatawara"
iex>Elixir.BaliPawukon.asatawara(730739, :value)
3
iex>Elixir.BaliPawukon.asatawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
3
iex>Elixir.BaliPawukon.asatawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:asatawara
iex>Elixir.BaliPawukon.asatawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
7
iex>Elixir.BaliPawukon.asatawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Asatawara"
iex>Elixir.BaliPawukon.asatawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
3 Specs
caturwara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the caturwara field of a BaliPawukon date.
The type parameter determines the type of the returned caturwara:
:atomreturns the internal name of caturwara,:indexreturns the position of the caturwara field within the date,:namereturns the common name of the caturwara,:valuereturns the value of the caturwara (default).
Examples
iex>Elixir.BaliPawukon.caturwara(730739)
3
iex>Elixir.BaliPawukon.caturwara(730739, :atom)
:caturwara
iex>Elixir.BaliPawukon.caturwara(730739, :index)
3
iex>Elixir.BaliPawukon.caturwara(730739, :name)
"Caturwara"
iex>Elixir.BaliPawukon.caturwara(730739, :value)
3
iex>Elixir.BaliPawukon.caturwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
3
iex>Elixir.BaliPawukon.caturwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:caturwara
iex>Elixir.BaliPawukon.caturwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
3
iex>Elixir.BaliPawukon.caturwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Caturwara"
iex>Elixir.BaliPawukon.caturwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
3 Specs
dasawara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the dasawara field of a BaliPawukon date.
The type parameter determines the type of the returned dasawara:
:atomreturns the internal name of dasawara,:indexreturns the position of the dasawara field within the date,:namereturns the common name of the dasawara,:valuereturns the value of the dasawara (default).
Examples
iex>Elixir.BaliPawukon.dasawara(730739)
2
iex>Elixir.BaliPawukon.dasawara(730739, :atom)
:dasawara
iex>Elixir.BaliPawukon.dasawara(730739, :index)
9
iex>Elixir.BaliPawukon.dasawara(730739, :name)
"Dasawara"
iex>Elixir.BaliPawukon.dasawara(730739, :value)
2
iex>Elixir.BaliPawukon.dasawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
2
iex>Elixir.BaliPawukon.dasawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:dasawara
iex>Elixir.BaliPawukon.dasawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
9
iex>Elixir.BaliPawukon.dasawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Dasawara"
iex>Elixir.BaliPawukon.dasawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
2 date(luang, dwiwara, triwara, caturwara, pancawara, sadwara, saptawara, asatawara, sangawara, dasawara)
View SourceSpecs
date( bali_pawukon_luang(), bali_pawukon_dwiwara(), bali_pawukon_triwara(), bali_pawukon_caturwara(), bali_pawukon_pancawara(), bali_pawukon_sadwara(), bali_pawukon_saptawara(), bali_pawukon_asatawara(), bali_pawukon_sangawara(), bali_pawukon_dasawara() ) :: t()
Returns a BaliPawukon date from its fields luang, dwiwara, triwara, caturwara, pancawara, sadwara, saptawara, asatawara, sangawara, dasawara.
Example
iex>Elixir.BaliPawukon.date(true, 2, 2, 3, 5, 5, 3, 3, 2, 2)
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2} Specs
dwiwara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the dwiwara field of a BaliPawukon date.
The type parameter determines the type of the returned dwiwara:
:atomreturns the internal name of dwiwara,:indexreturns the position of the dwiwara field within the date,:namereturns the common name of the dwiwara,:valuereturns the value of the dwiwara (default).
Examples
iex>Elixir.BaliPawukon.dwiwara(730739)
2
iex>Elixir.BaliPawukon.dwiwara(730739, :atom)
:dwiwara
iex>Elixir.BaliPawukon.dwiwara(730739, :index)
1
iex>Elixir.BaliPawukon.dwiwara(730739, :name)
"Dwiwara"
iex>Elixir.BaliPawukon.dwiwara(730739, :value)
2
iex>Elixir.BaliPawukon.dwiwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
2
iex>Elixir.BaliPawukon.dwiwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:dwiwara
iex>Elixir.BaliPawukon.dwiwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
1
iex>Elixir.BaliPawukon.dwiwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Dwiwara"
iex>Elixir.BaliPawukon.dwiwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
2 Specs
epoch() :: number()
Returns the epoch of the BaliPawukon calendar.
Example
iex>Elixir.BaliPawukon.epoch()
-1721279 Specs
Returns the name of the field atom in a BaliPawukon date at field_index.
Examples
iex>Elixir.BaliPawukon.field_atom(0)
:luang
iex>Elixir.BaliPawukon.field_atom(1)
:dwiwara
iex>Elixir.BaliPawukon.field_atom(2)
:triwara
iex>Elixir.BaliPawukon.field_atom(3)
:caturwara
iex>Elixir.BaliPawukon.field_atom(4)
:pancawara
iex>Elixir.BaliPawukon.field_atom(5)
:sadwara
iex>Elixir.BaliPawukon.field_atom(6)
:saptawara
iex>Elixir.BaliPawukon.field_atom(7)
:asatawara
iex>Elixir.BaliPawukon.field_atom(8)
:sangawara
iex>Elixir.BaliPawukon.field_atom(9)
:dasawara Specs
field_atoms() :: [atom()]
Returns a list of the field atoms (names) of a BaliPawukon date.
Example
iex>Elixir.BaliPawukon.field_atoms()
[:luang, :dwiwara, :triwara, :caturwara, :pancawara, :sadwara, :saptawara, :asatawara, :sangawara, :dasawara] Specs
field_count() :: integer()
Returns the number of fields in a BaliPawukon date
Example
iex>Elixir.BaliPawukon.field_count()
10 Specs
Returns the index (= position) of the field_atom in a BaliPawukon date.
Examples
iex>Elixir.BaliPawukon.field_index(:luang)
0
iex>Elixir.BaliPawukon.field_index(:dwiwara)
1
iex>Elixir.BaliPawukon.field_index(:triwara)
2
iex>Elixir.BaliPawukon.field_index(:caturwara)
3
iex>Elixir.BaliPawukon.field_index(:pancawara)
4
iex>Elixir.BaliPawukon.field_index(:sadwara)
5
iex>Elixir.BaliPawukon.field_index(:saptawara)
6
iex>Elixir.BaliPawukon.field_index(:asatawara)
7
iex>Elixir.BaliPawukon.field_index(:sangawara)
8
iex>Elixir.BaliPawukon.field_index(:dasawara)
9 Specs
from_date(tuple(), module()) :: bali_pawukon_date()
from_date(tuple(), module()) :: {:error, String.t()}
Converts the other_date of the other_calendar into the equivalent date of the BaliPawukon calendar.
Example
iex>Elixir.BaliPawukon.from_date({2001, 9, 11}, Gregorian)
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2} Specs
from_fixed(fixed()) :: bali_pawukon_date()
Converts a fixed day to a BaliPawukon date.
Example
iex>Elixir.BaliPawukon.from_fixed(730739)
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2} Specs
from_jd(tuple() | number()) :: bali_pawukon_date()
Converts a Julian Day into the equivalent BaliPawukon date.
The Julian Day can be given as a tuple or by a Julian day.
Examples
iex>Elixir.BaliPawukon.from_jd({2452163.5})
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2}
iex>Elixir.BaliPawukon.from_jd(2452163.5)
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2} Specs
from_rata_die(tuple() | integer()) :: bali_pawukon_date()
Converts a RataDie date into the equivalent BaliPawukon date.
The RataDie date can be given as a tuple or by a RataDie rd.
Examples
iex>Elixir.BaliPawukon.from_rata_die({730739})
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2}
iex>Elixir.BaliPawukon.from_rata_die(730739)
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2} Specs
from_unix(tuple() | integer()) :: bali_pawukon_date()
Converts a Unix date into the equivalent BaliPawukon date.
The Unix date can be given as a tuple or by Unix seconds.
Examples
iex>Elixir.BaliPawukon.from_unix({1000166400})
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2}
iex>Elixir.BaliPawukon.from_unix(1000166400)
{true, 2, 2, 3, 5, 5, 3, 3, 2, 2} Returns a list of the holidays of the BaliPawukon calendar.
The type parameter determines the type of the returned holidays:
:atomreturns the internal names of the holidays,:namereturns the common names of the holidays (default).
Examples
iex>Elixir.BaliPawukon.holidays()
["Kajeng Keliwon (first)", "Tumpek (first)"]
iex>Elixir.BaliPawukon.holidays(:atom)
[:kajeng_keliwon, :tumpek]
iex>Elixir.BaliPawukon.holidays(:name)
["Kajeng Keliwon (first)", "Tumpek (first)"] Specs
kajeng_keliwon(Gregorian.gregorian_year()) :: fixed() | bali_pawukon_date()
Returns the fixed date of Kajeng Keliwon (first) of the
BaliPawukon 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:
:fixedreturns a fixed day (default),:datereturns a BaliPawukon date.
Example
iex>Elixir.BaliPawukon.kajeng_keliwon(2001)
{2001, 1, 9} Specs
keyword() :: atom()
Returns the internal keyword of the BaliPawukon calendar.
Example
iex>Elixir.BaliPawukon.keyword()
:bali_pawukon Specs
luang(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the luang field of a BaliPawukon date.
The type parameter determines the type of the returned luang:
:atomreturns the internal name of luang,:indexreturns the position of the luang field within the date,:namereturns the common name of the luang,:valuereturns the value of the luang (default).
Examples
iex>Elixir.BaliPawukon.luang(730739)
true
iex>Elixir.BaliPawukon.luang(730739, :atom)
:luang
iex>Elixir.BaliPawukon.luang(730739, :index)
0
iex>Elixir.BaliPawukon.luang(730739, :name)
"Luang"
iex>Elixir.BaliPawukon.luang(730739, :value)
true
iex>Elixir.BaliPawukon.luang({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
true
iex>Elixir.BaliPawukon.luang({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:luang
iex>Elixir.BaliPawukon.luang({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
0
iex>Elixir.BaliPawukon.luang({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Luang"
iex>Elixir.BaliPawukon.luang({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
true Specs
module() :: module()
Returns the module of the BaliPawukon calendar.
Example
iex>Elixir.BaliPawukon.module()
BaliPawukon Specs
name() :: atom()
Returns the internal name of the BaliPawukon calendar.
Example
iex>Elixir.BaliPawukon.name()
"BaliPawukon" Specs
pancawara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the pancawara field of a BaliPawukon date.
The type parameter determines the type of the returned pancawara:
:atomreturns the internal name of pancawara,:indexreturns the position of the pancawara field within the date,:namereturns the common name of the pancawara,:valuereturns the value of the pancawara (default).
Examples
iex>Elixir.BaliPawukon.pancawara(730739)
5
iex>Elixir.BaliPawukon.pancawara(730739, :atom)
:pancawara
iex>Elixir.BaliPawukon.pancawara(730739, :index)
4
iex>Elixir.BaliPawukon.pancawara(730739, :name)
"Pancawara"
iex>Elixir.BaliPawukon.pancawara(730739, :value)
5
iex>Elixir.BaliPawukon.pancawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
5
iex>Elixir.BaliPawukon.pancawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:pancawara
iex>Elixir.BaliPawukon.pancawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
4
iex>Elixir.BaliPawukon.pancawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Pancawara"
iex>Elixir.BaliPawukon.pancawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
5 Specs
sadwara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the sadwara field of a BaliPawukon date.
The type parameter determines the type of the returned sadwara:
:atomreturns the internal name of sadwara,:indexreturns the position of the sadwara field within the date,:namereturns the common name of the sadwara,:valuereturns the value of the sadwara (default).
Examples
iex>Elixir.BaliPawukon.sadwara(730739)
5
iex>Elixir.BaliPawukon.sadwara(730739, :atom)
:sadwara
iex>Elixir.BaliPawukon.sadwara(730739, :index)
5
iex>Elixir.BaliPawukon.sadwara(730739, :name)
"Sadwara"
iex>Elixir.BaliPawukon.sadwara(730739, :value)
5
iex>Elixir.BaliPawukon.sadwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
5
iex>Elixir.BaliPawukon.sadwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:sadwara
iex>Elixir.BaliPawukon.sadwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
5
iex>Elixir.BaliPawukon.sadwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Sadwara"
iex>Elixir.BaliPawukon.sadwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
5 Specs
sangawara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the sangawara field of a BaliPawukon date.
The type parameter determines the type of the returned sangawara:
:atomreturns the internal name of sangawara,:indexreturns the position of the sangawara field within the date,:namereturns the common name of the sangawara,:valuereturns the value of the sangawara (default).
Examples
iex>Elixir.BaliPawukon.sangawara(730739)
2
iex>Elixir.BaliPawukon.sangawara(730739, :atom)
:sangawara
iex>Elixir.BaliPawukon.sangawara(730739, :index)
8
iex>Elixir.BaliPawukon.sangawara(730739, :name)
"Sangawara"
iex>Elixir.BaliPawukon.sangawara(730739, :value)
2
iex>Elixir.BaliPawukon.sangawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
2
iex>Elixir.BaliPawukon.sangawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:sangawara
iex>Elixir.BaliPawukon.sangawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
8
iex>Elixir.BaliPawukon.sangawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Sangawara"
iex>Elixir.BaliPawukon.sangawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
2 Specs
saptawara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the saptawara field of a BaliPawukon date.
The type parameter determines the type of the returned saptawara:
:atomreturns the internal name of saptawara,:indexreturns the position of the saptawara field within the date,:namereturns the common name of the saptawara,:valuereturns the value of the saptawara (default).
Examples
iex>Elixir.BaliPawukon.saptawara(730739)
3
iex>Elixir.BaliPawukon.saptawara(730739, :atom)
:saptawara
iex>Elixir.BaliPawukon.saptawara(730739, :index)
6
iex>Elixir.BaliPawukon.saptawara(730739, :name)
"Saptawara"
iex>Elixir.BaliPawukon.saptawara(730739, :value)
3
iex>Elixir.BaliPawukon.saptawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
3
iex>Elixir.BaliPawukon.saptawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:saptawara
iex>Elixir.BaliPawukon.saptawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
6
iex>Elixir.BaliPawukon.saptawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Saptawara"
iex>Elixir.BaliPawukon.saptawara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
3 Specs
triwara(fixed() | bali_pawukon_date(), :atom | :index | :name | :value) :: :atom | integer() | String.t() | number()
Returns the triwara field of a BaliPawukon date.
The type parameter determines the type of the returned triwara:
:atomreturns the internal name of triwara,:indexreturns the position of the triwara field within the date,:namereturns the common name of the triwara,:valuereturns the value of the triwara (default).
Examples
iex>Elixir.BaliPawukon.triwara(730739)
2
iex>Elixir.BaliPawukon.triwara(730739, :atom)
:triwara
iex>Elixir.BaliPawukon.triwara(730739, :index)
2
iex>Elixir.BaliPawukon.triwara(730739, :name)
"Triwara"
iex>Elixir.BaliPawukon.triwara(730739, :value)
2
iex>Elixir.BaliPawukon.triwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2})
2
iex>Elixir.BaliPawukon.triwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :atom)
:triwara
iex>Elixir.BaliPawukon.triwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :index)
2
iex>Elixir.BaliPawukon.triwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :name)
"Triwara"
iex>Elixir.BaliPawukon.triwara({true, 2, 2, 3, 5, 5, 3, 3, 2, 2}, :value)
2 Specs
tumpek(Gregorian.gregorian_year()) :: fixed() | bali_pawukon_date()
Returns the fixed date of Tumpek (first) of the
BaliPawukon 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:
:fixedreturns a fixed day (default),:datereturns a BaliPawukon date.
Example
iex>Elixir.BaliPawukon.tumpek(2001)
{2001, 2, 3}