You're seeing just the function era, go back to Cldr.DateTime.Formatter module for more information.
Link to this function

era(era, n \\ 1, options \\ [])

View Source


era(, integer(), Keyword.t()) ::
  String.t() | {:error, String.t()}

Returns the era (format symbol G) of a date for given locale.


  • date is a Date struct or any map that contains at least the keys :month and :calendar

  • n in an integer between 1 and 5 that determines the format of the year

  • locale is any valid locale name returned by Cldr.known_locale_names/0 or a Cldr.LanguageTag struct. The default is Cldr.get_locale/0

  • options is a Keyword list of options. The only applicable option is :era with a value of either nil (the default) or :variant which will return the variant form of an era if one is available.

Format Symbol

The representation of the era is made in accordance with the following table:

SymbolExampleCldr Format
G, GG, GGG"AD"Abbreviated
GGGG"Anno DominiWide


iex> Cldr.DateTime.Formatter.era ~D[2017-12-01], 1

iex> Cldr.DateTime.Formatter.era ~D[2017-12-01], 4, "fr", MyApp.Cldr
"après Jésus-Christ"
Link to this function

era(date, n, locale, backend, options \\ [])

View Source


era(, integer(), locale(), Cldr.backend(), Keyword.t()) ::
  String.t() | {:error, String.t()}