You're seeing just the function to_string-exclamation-mark, go back to Cldr.DateTime.Relative module for more information.
Link to this function

to_string!(relative, backend \\ Cldr.Date.default_backend(), options \\ [])

View Source


  integer() | float() | Date.t() | DateTime.t(),
) :: String.t()

Returns a {:ok, string} representing a relative time (ago, in) for a given number, Date or Datetime or raises an exception on error.


  • relative is a number or Date/Datetime representing the time distance from now or from options[:relative_to].

  • backend is any module that includes use Cldr and therefore is a Cldr backend module. The default is Cldr.default_backend/0.

  • options is a Keyword list of options.


  • :locale is the locale in which the binary is formatted. The default is Cldr.get_locale/0

  • :format is the format of the binary. Format may be :default, :narrow or :short. The default is :default

  • :unit is the time unit for the formatting. The allowable units are :second, :minute, :hour, :day, :week, :month, :year, :mon, :tue, :wed, :thu, :fri, :sat, :sun, :quarter

  • :relative_to is the baseline Date or Datetime from which the difference from relative is calculated when relative is a Date or a DateTime. The default for a Date is Date.utc_today, for a DateTime it is DateTime.utc_now

See to_string/3