You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a relative time string (e.g., "2 days ago", "in 3 hours") based on the difference between the given date and now.
39
+
40
+
**Kind**: global function
41
+
**Returns**: <code>string</code> - - A human-readable relative time string (e.g., "2 days ago", "in 3 hours").
42
+
43
+
| Param | Type | Description |
44
+
| --- | --- | --- |
45
+
|[date]| <code>Date</code> | The date to compare with the current date and time. If not given, defaults to now. |
46
+
|[lang]| <code>string</code> | Optional language code to use for formatting (e.g., 'en', 'fr'). If not provided, defaults to the application locale or 'en'. |
0 commit comments