Skip to content
Ben Soyka edited this page Nov 20, 2021 · 3 revisions

Welcome to the discord-timestamps documentation!


format_timestamp

A function to format a timestamp for Discord

Arguments

  • timestamp: An int, float, or Arrow object to convert
  • timestamp_type: A TimestampType to use as the timestamp format

Returns

A str such as <t:1609459200>

TimestampType

An Enum with all possible timestamp formats

The following are valid dot properties:

  • SHORT_TIME
  • LONG_TIME
  • SHORT_DATE
  • LONG_DATE
  • SHORT_DATETIME
  • LONG_DATETIME
  • RELATIVE
Clone this wiki locally