feat(datetime): add format_distance_to_now function#6615
feat(datetime): add format_distance_to_now function#6615fbritoferreira wants to merge 4 commits intodenoland:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6615 +/- ##
==========================================
- Coverage 94.54% 94.52% -0.02%
==========================================
Files 580 581 +1
Lines 43772 43797 +25
Branches 6480 6496 +16
==========================================
+ Hits 41384 41401 +17
- Misses 2345 2353 +8
Partials 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
While I think this is kinda neat in general I think it opens a big can of worms concerning localization. |
I agree. I instead suggest adding an example snippet to |
|
I suggest closing this PR in favour of my suggestion above. |
|
I agree with @timreichen and @iuioiua . @fbritoferreira Thanks for your suggestion anyways Closing without merge |
This PR introduces the
formatDistanceToNowfunction to the@std/datetime package.The function formats a given Date object as a human-readable relative time string, such as "3 minutes ago" or "1 hour ago".