Skip to content

docs: improve time.rst #7636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions user_guide_src/source/libraries/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ Instantiating
*************

There are several ways that a new Time instance can be created. The first is simply to create a new instance
like any other class. When you do it this way, you can pass in a string representing the desired time. This can
be any string that PHP's strtotime function can parse:
like any other class.

When you do it this way, you can pass in a string representing the desired time. This can
be any string that PHP's `strtotime()`_ function can parse:

.. _strtotime(): https://www.php.net/manual/en/function.strtotime.php

.. literalinclude:: time/001.php

Expand Down Expand Up @@ -159,7 +163,7 @@ toDateTimeString()
==================

This is the first of three helper methods to work with the `IntlDateFormatter <https://www.php.net/manual/en/class.intldateformatter.php>`_ without having to remember their values.
This will return a localized version of string formatted as (Y-m-d H:i:s):
This will return a localized version of string formatted as (``Y-m-d H:i:s``):

.. literalinclude:: time/016.php

Expand Down