File tree 1 file changed +21
-0
lines changed
user_guide_src/source/libraries
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,27 @@ modify the existing Time instance, but will return a new instance.
325
325
326
326
.. literalinclude :: time/031.php
327
327
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
+
328
349
Comparing Two Times
329
350
===================
330
351
You can’t perform that action at this time.
0 commit comments