Skip to content

Commit 4ea0156

Browse files
committed
docs: decorate class,method,variable with '``'
1 parent dfeb02f commit 4ea0156

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

user_guide_src/source/libraries/time.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Times and Dates
44

55
CodeIgniter provides a fully-localized, immutable, date/time class that is built on PHP's DateTime object, but uses the Intl
66
extension's features to convert times across timezones and display the output correctly for different locales. This class
7-
is the **Time** class and lives in the **CodeIgniter\\I18n** namespace.
7+
is the ``Time`` class and lives in the ``CodeIgniter\I18n`` namespace.
88

99
.. note:: Since the Time class extends DateTime, if there are features that you need that this class doesn't provide,
1010
you can likely find them within the DateTime class itself.
@@ -38,7 +38,7 @@ provided, the application defaults will be used.
3838
now()
3939
-----
4040

41-
The Time class has several helper methods to instantiate the class. The first of these is the **now()** method
41+
The Time class has several helper methods to instantiate the class. The first of these is the ``now()`` method
4242
that returns a new instance set to the current time. You can pass in strings representing the timezone and the locale
4343
in the second and parameters, respectively. If no locale or timezone is provided, the application defaults will be used.
4444

@@ -92,7 +92,7 @@ fourth and fifth parameters::
9292
createFromTime()
9393
----------------
9494

95-
Like **createFromDate** except it is only concerned with the **hours**, **minutes**, and **seconds**. Uses the
95+
Like ``createFromDate()`` except it is only concerned with the **hours**, **minutes**, and **seconds**. Uses the
9696
current day for the date portion of the Time instance. Accepts strings for the timezone and locale in the
9797
fourth and fifth parameters::
9898

@@ -113,7 +113,7 @@ createFromFormat()
113113
------------------
114114

115115
This is a replacement for DateTime's method of the same name. This allows the timezone to be set at the same time,
116-
and returns a **Time** instance, instead of DateTime::
116+
and returns a ``Time`` instance, instead of DateTime::
117117

118118
$time = Time::createFromFormat('j-M-Y', '15-Feb-2009', 'America/Chicago');
119119

@@ -154,7 +154,7 @@ to display localized versions of the value, though.
154154
toLocalizedString()
155155
-------------------
156156

157-
This is the localized version of DateTime's format() method. Instead of using the values you might be familiar with, though,
157+
This is the localized version of DateTime's ``format()`` method. Instead of using the values you might be familiar with, though,
158158
you must use values acceptable to the `IntlDateFormatter <https://www.php.net/manual/en/class.intldateformatter.php>`__ class.
159159
A full listing of values can be found `here <https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classSimpleDateFormat.html#details>`__.
160160
::
@@ -224,8 +224,8 @@ The Time object provides a number of methods to allow to get and set individual
224224
of an existing instance. All of the values retrieved through the following methods will be fully localized and respect
225225
the locale that the Time instance was created with.
226226

227-
All of the following `getX` and `setX` methods can also be used as if they were a class property. So, any calls to methods
228-
like `getYear` can also be accessed through `$time->year`, and so on.
227+
All of the following ``getX()`` and ``setX()`` methods can also be used as if they were a class property. So, any calls to methods
228+
like ``getYear()`` can also be accessed through ``$time->year``, and so on.
229229

230230
Getters
231231
-------
@@ -416,7 +416,7 @@ a timezone string in as the second parameter. If no timezone is given, the syste
416416
sameAs()
417417
--------
418418

419-
This is identical to the **equals** method, except that it only returns true when the date, time, AND timezone are
419+
This is identical to the ``equals()`` method, except that it only returns true when the date, time, AND timezone are
420420
all identical::
421421

422422
$time1 = Time::parse('January 10, 2017 21:50:00', 'America/Chicago');
@@ -446,7 +446,7 @@ a timezone string in as the second parameter. If no timezone is given, the syste
446446
isAfter()
447447
---------
448448

449-
Works exactly the same as **isBefore()** except checks if the time is after the time passed in::
449+
Works exactly the same as ``isBefore()`` except checks if the time is after the time passed in::
450450

451451
$time1 = Time::parse('January 10, 2017 21:50:00', 'America/Chicago');
452452
$time2 = Time::parse('January 11, 2017 03:50:00', 'America/Chicago');
@@ -457,7 +457,7 @@ Works exactly the same as **isBefore()** except checks if the time is after the
457457
Viewing Differences
458458
===================
459459

460-
To compare two Times directly, you would use the **difference()** method, which returns a **CodeIgniter\\I18n\\TimeDifference**
460+
To compare two Times directly, you would use the ``difference()`` method, which returns a ``CodeIgniter\\I18n\\TimeDifference``
461461
instance. The first parameter is either a Time instance, a DateTime instance, or a string with the date/time. If
462462
a string is passed in the first parameter, the second parameter can be a timezone string::
463463

@@ -484,7 +484,7 @@ the original time::
484484
echo $diff->getMinutes(); // -3682080
485485
echo $diff->getSeconds(); // -220924800
486486

487-
You can use either **getX()** methods, or access the calculate values as if they were properties::
487+
You can use either ``getX()`` methods, or access the calculate values as if they were properties::
488488

489489
echo $diff->years; // -7
490490
echo $diff->months; // -84
@@ -497,7 +497,7 @@ You can use either **getX()** methods, or access the calculate values as if they
497497
humanize()
498498
----------
499499

500-
Much like Time's humanize() method, this returns a string that displays the difference between the times in a
500+
Much like Time's ``humanize()`` method, this returns a string that displays the difference between the times in a
501501
human readable format that is geared towards being easily understood. It can create strings like '3 hours ago',
502502
'in 1 month', etc. The biggest differences are in how very recent dates are handled::
503503

0 commit comments

Comments
 (0)