Skip to content

Commit 0cdbf65

Browse files
update
1 parent 7861e3d commit 0cdbf65

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/Time.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,28 @@
2121
* - Range helper: dateRange()
2222
* - Text features/config: config(), greeting(), timeAgo()
2323
*
24-
* All methods are documented at their definitions for clarity.
24+
* Magic methods routed via __call/__callStatic (documented for static analysis):
25+
* @method int second() Number of seconds since the stored time
26+
* @method int min() Number of minutes since the stored time
27+
* @method int hour() Number of hours since the stored time
28+
* @method int day() Number of days since the stored time
29+
* @method int week() Number of weeks since the stored time
30+
* @method int month() Number of months since the stored time
31+
* @method int year() Number of years since the stored time
32+
* @method array|int diff(string|null $unit = null) Time difference; array when unit is null, integer when unit provided (sec|mins|hour|days|weeks|month|year)
33+
* @method array|string timeAgo(string|null $mode = null) Humanized time-ago; array for default, string for specific modes like "short"
34+
* @method string greeting(int|string $date = 'now') Greeting based on hour of $date in current timezone
35+
*
36+
* @method static int second()
37+
* @method static int min()
38+
* @method static int hour()
39+
* @method static int day()
40+
* @method static int week()
41+
* @method static int month()
42+
* @method static int year()
43+
* @method static array|int diff(string|null $unit = null)
44+
* @method static array|string timeAgo(string|null $mode = null)
45+
* @method static string greeting(int|string $date = 'now')
2546
*/
2647
final class Time {
2748

0 commit comments

Comments
 (0)