Skip to content

Commit 6492d71

Browse files
update user guide
1 parent c6cbf0f commit 6492d71

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

user_guide_src/source/libraries/time.rst

+21
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,27 @@ modify the existing Time instance, but will return a new instance.
325325

326326
.. literalinclude:: time/031.php
327327

328+
addCalendarMonths()
329+
-------------------
330+
331+
subCalendarMonths()
332+
-------------------
333+
334+
Modifies the current Time by adding or subtracting whole calendar months. These methods can be useful if you
335+
require no calendar months are skipped in recurring dates. Refer to the table below for a comparison between
336+
``addMonths()`` and ``addCalendarMonths()`` for an initial date of ``2025-01-31``.
337+
338+
======= =========== ===================
339+
$months addMonths() addCalendarMonths()
340+
======= =========== ===================
341+
1 2025-03-03 2025-02-28
342+
2 2025-03-31 2025-03-31
343+
3 2025-05-01 2025-04-30
344+
4 2025-05-31 2025-05-31
345+
5 2025-07-01 2025-06-30
346+
6 2025-07-31 2025-07-31
347+
======= =========== ===================
348+
328349
Comparing Two Times
329350
===================
330351

0 commit comments

Comments
 (0)