time

Module formatting

source
Expand description

Formatting for various types.

Re-exportsยง

Modulesยง

  • formattable ๐Ÿ”’
    A trait that can be used to format an item from its components.
  • iso8601 ๐Ÿ”’
    Helpers for implementing formatting for ISO 8601.

Constantsยง

Functionsยง

  • fmt_day ๐Ÿ”’
    Format the day into the designated output.
  • fmt_hour ๐Ÿ”’
    Format the hour into the designated output.
  • fmt_minute ๐Ÿ”’
    Format the minute into the designated output.
  • fmt_month ๐Ÿ”’
    Format the month into the designated output.
  • fmt_offset_hour ๐Ÿ”’
    Format the offset hour into the designated output.
  • fmt_offset_minute ๐Ÿ”’
    Format the offset minute into the designated output.
  • fmt_offset_second ๐Ÿ”’
    Format the offset second into the designated output.
  • fmt_ordinal ๐Ÿ”’
    Format the ordinal into the designated output.
  • fmt_period ๐Ÿ”’
    Format the period into the designated output.
  • fmt_second ๐Ÿ”’
    Format the second into the designated output.
  • fmt_subsecond ๐Ÿ”’
    Format the subsecond into the designated output.
  • fmt_unix_timestamp ๐Ÿ”’
    Format the Unix timestamp into the designated output.
  • fmt_week_number ๐Ÿ”’
    Format the week number into the designated output.
  • fmt_weekday ๐Ÿ”’
    Format the weekday into the designated output.
  • fmt_year ๐Ÿ”’
    Format the year into the designated output.
  • format_component ๐Ÿ”’
    Format the provided component into the designated output. An Err will be returned if the component requires information that it does not provide or if the value cannot be output to the stream.
  • format_float ๐Ÿ”’
    Write the floating point number to the output, returning the number of bytes written.
  • format_number ๐Ÿ”’
    Format a number with the provided padding and width.
  • Format a number with no padding.
  • Format a number with the provided width and spaces as padding.
  • Format a number with the provided width and zeros as padding.
  • write ๐Ÿ”’
    Write all bytes to the output, returning the number of bytes written.
  • write_if ๐Ÿ”’
    If pred is true, write all bytes to the output, returning the number of bytes written.
  • write_if_else ๐Ÿ”’
    If pred is true, write true_bytes to the output. Otherwise, write false_bytes.