Skip to content

Commit 2bd89ab

Browse files
authored
add a doc link for arrow.format (#1180)
1 parent 41717e5 commit 2bd89ab

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

arrow/arrow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,8 @@ def format(
10881088
self, fmt: str = "YYYY-MM-DD HH:mm:ssZZ", locale: str = DEFAULT_LOCALE
10891089
) -> str:
10901090
"""Returns a string representation of the :class:`Arrow <arrow.arrow.Arrow>` object,
1091-
formatted according to the provided format string.
1091+
formatted according to the provided format string. For a list of formatting values,
1092+
see :ref:`supported-tokens`
10921093
10931094
:param fmt: the format string.
10941095
:param locale: the locale to format.

docs/guide.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ Move between the earlier and later moments of an ambiguous time:
156156
Format
157157
~~~~~~
158158

159+
For a list of formatting values, see :ref:`supported-tokens`
160+
159161
.. code-block:: python
160162
161163
>>> arrow.utcnow().format('YYYY-MM-DD HH:mm:ss ZZ')
@@ -365,6 +367,8 @@ Then get and use a factory for it:
365367
>>> custom.days_till_xmas()
366368
>>> 211
367369
370+
.. _supported-tokens:
371+
368372
Supported Tokens
369373
~~~~~~~~~~~~~~~~
370374

0 commit comments

Comments
 (0)