|
21 | 21 | * - Range helper: dateRange() |
22 | 22 | * - Text features/config: config(), greeting(), timeAgo() |
23 | 23 | * |
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') |
25 | 46 | */ |
26 | 47 | final class Time { |
27 | 48 |
|
|
0 commit comments