DayEx.Locale behaviour (day_ex v1.10.115)

Copy Markdown View Source

Behaviour for DayEx locale modules.

Summary

Functions

Get locale module for a given locale atom.

Callbacks

calendar()

(optional)
@callback calendar() :: DayEx.Calendar.formats()

formats()

@callback formats() :: %{required(String.t()) => String.t()}

meridiem_lower()

@callback meridiem_lower() :: {String.t(), String.t()}

meridiem_upper()

@callback meridiem_upper() :: {String.t(), String.t()}

months_full()

@callback months_full() :: [String.t()]

months_short()

@callback months_short() :: [String.t()]

ordinal(integer)

@callback ordinal(integer()) :: String.t()

relative_time()

@callback relative_time() :: map()

week_start()

@callback week_start() :: 0..6

weekdays_full()

@callback weekdays_full() :: [String.t()]

weekdays_min()

@callback weekdays_min() :: [String.t()]

weekdays_short()

@callback weekdays_short() :: [String.t()]

Functions

get(locale)

Get locale module for a given locale atom.