Skip to content

Commit

Permalink
add a doc link for arrow.format (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
saranti authored Jul 9, 2024
1 parent 41717e5 commit 2bd89ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arrow/arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,8 @@ def format(
self, fmt: str = "YYYY-MM-DD HH:mm:ssZZ", locale: str = DEFAULT_LOCALE
) -> str:
"""Returns a string representation of the :class:`Arrow <arrow.arrow.Arrow>` object,
formatted according to the provided format string.
formatted according to the provided format string. For a list of formatting values,
see :ref:`supported-tokens`
:param fmt: the format string.
:param locale: the locale to format.
Expand Down
4 changes: 4 additions & 0 deletions docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ Move between the earlier and later moments of an ambiguous time:
Format
~~~~~~

For a list of formatting values, see :ref:`supported-tokens`

.. code-block:: python
>>> arrow.utcnow().format('YYYY-MM-DD HH:mm:ss ZZ')
Expand Down Expand Up @@ -365,6 +367,8 @@ Then get and use a factory for it:
>>> custom.days_till_xmas()
>>> 211
.. _supported-tokens:

Supported Tokens
~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 2bd89ab

Please sign in to comment.