Cldr.DateTime.Formatter.millisecond
You're seeing just the function
millisecond, go back to Cldr.DateTime.Formatter module for more information.
Specs
millisecond(Calendar.time(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the time (format symbol A) as millisenconds since
midnight.
Arguments
timeis aTimestruct or any map that contains at least the key:secondwith and optional:microsecondkey of the format used byTimenis the number of fractional digits to which the float number of seconds is roundedlocaleis any valid locale name returned byCldr.known_locale_names/0or aCldr.LanguageTagstruct. The default isCldr.get_locale/0optionsis aKeywordlist of options. There are no options used inmillisecond/4
Format Symbol
The representation of the milliseconds is made in accordance with the following
table:
| Symbol | Results | Description |
|---|---|---|
| A+ | "4000" | Minimum necessary digits of milliseconds since midnight |
Examples
iex> Cldr.DateTime.Formatter.millisecond %{hour: 0, minute: 0,
...> second: 4, microsecond: {2000, 3}}, 1
"4002"
iex> Cldr.DateTime.Formatter.millisecond %{hour: 0, minute: 0, second: 4}, 1
"4000"
iex> Cldr.DateTime.Formatter.millisecond %{hour: 10, minute: 10, second: 4}, 1
"36604000"
iex> Cldr.DateTime.Formatter.millisecond ~T[07:35:13.215217]
"27313215"
Specs
millisecond(Calendar.time(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}