Skip to content

Add anywhen#55

Open
kirilinsky wants to merge 1 commit intouhub:masterfrom
kirilinsky:patch-1
Open

Add anywhen#55
kirilinsky wants to merge 1 commit intouhub:masterfrom
kirilinsky:patch-1

Conversation

@kirilinsky
Copy link

anywhen -fuzzy date formatting via native Intl.
Zero deps, 200+ locales out of the box — no locale files, no config.

demo - https://anywhen-kappa.vercel.app/

anywhen(date, 'en')         // outcome > "just now"
anywhen(date, 'en')         // outcome > "10 minutes ago"
anywhen(date, 'en')         // outcome > "today, 2:35 PM"
anywhen(date, 'en')         // outcome > "yesterday, 9:00 AM"
anywhen(date, 'en')         // outcome > "Wednesday, 11:20 AM"
anywhen(date, 'en')         // outcome > "Feb 5, 2016"
anywhen(date, 'en')         // outcome > "in 2 weeks"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant