discord-timestamps

Generation of properly-formatted dynamic timestamps for Discord messages


Keywords
arrow, discord, discord-time, timestamp
License
MIT
Install
pip install discord-timestamps==1.0.2

Documentation

discord-timestamps

discord-timestamps generates properly-formatted dynamic timestamps for Discord messages, with support for Arrow objects.

>>> format_timestamp(datetime(2021, 11, 20, 12, 0, 0))
'<t:1637409600>'

>>> format_timestamp(datetime(...), TimestampType.RELATIVE)
'<t:1637409600:R>'

Downloads Supported Versions Testing License Version

Installation

discord-timestamps is available on PyPI:

$ pip install discord-timestamps

discord-timestamps officially supports Python 3.6+.

API Reference

See the wiki for discord-timestamps's documentation.