@@ -1390,31 +1390,35 @@ def signature_has_self_param(function: Callable[..., Any]) -> bool:
13901390 return not parent .endswith (".<locals>" )
13911391
13921392
1393- TimestampStyle = Literal ["f " , "F " , "d" , "D" , "t " , "T " , "R" ]
1393+ TimestampStyle = Literal ["t " , "T " , "d" , "D" , "f " , "F" , "s" , "S " , "R" ]
13941394
13951395
13961396def format_dt (dt : Union [datetime .datetime , float ], / , style : TimestampStyle = "f" ) -> str :
1397- """A helper function to format a :class:`datetime.datetime`, :class:`int` or :class:`float` for presentation within Discord.
1397+ """Format a :class:`datetime.datetime`, :class:`int` or :class:`float` (seconds) for presentation within Discord.
13981398
13991399 This allows for a locale-independent way of presenting data using Discord specific Markdown.
14001400
1401- +-------------+----------------------------+-----------------+
1402- | Style | Example Output | Description |
1403- +=============+============================+=================+
1404- | t | 22:57 | Short Time |
1405- +-------------+----------------------------+-----------------+
1406- | T | 22:57:58 | Long Time |
1407- +-------------+----------------------------+-----------------+
1408- | d | 17/05/2016 | Short Date |
1409- +-------------+----------------------------+-----------------+
1410- | D | 17 May 2016 | Long Date |
1411- +-------------+----------------------------+-----------------+
1412- | f (default) | 17 May 2016 22:57 | Short Date Time |
1413- +-------------+----------------------------+-----------------+
1414- | F | Tuesday, 17 May 2016 22:57 | Long Date Time |
1415- +-------------+----------------------------+-----------------+
1416- | R | 5 years ago | Relative Time |
1417- +-------------+----------------------------+-----------------+
1401+ +-------------+-------------------------------+------------------------+
1402+ | Style | Example Output | Description |
1403+ +=============+===============================+========================+
1404+ | t | 22:57 | Short Time |
1405+ +-------------+-------------------------------+------------------------+
1406+ | T | 22:57:58 | Long Time |
1407+ +-------------+-------------------------------+------------------------+
1408+ | d | 17/05/2016 | Short Date |
1409+ +-------------+-------------------------------+------------------------+
1410+ | D | 17 May 2016 | Long Date |
1411+ +-------------+-------------------------------+------------------------+
1412+ | f (default) | 17 May 2016 at 22:57 | Long Date, Short Time |
1413+ +-------------+-------------------------------+------------------------+
1414+ | F | Tuesday, 17 May 2016 at 22:57 | Full Date, Short Time |
1415+ +-------------+-------------------------------+------------------------+
1416+ | s | 17/05/2016, 22:57 | Short Date, Short Time |
1417+ +-------------+-------------------------------+------------------------+
1418+ | S | 17/05/2016, 22:57:58 | Short Date, Long Time |
1419+ +-------------+-------------------------------+------------------------+
1420+ | R | 5 years ago | Relative Time |
1421+ +-------------+-------------------------------+------------------------+
14181422
14191423 Note that the exact output depends on the user's locale setting in the client. The example output
14201424 presented is using the ``en-GB`` locale.
0 commit comments