-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Relative time formatting #27
base: main
Are you sure you want to change the base?
Conversation
@romanhrynevych is attempting to deploy a commit to the Formkit Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for this head start @romanhrynevych — one thing I would like to explore (or rule out as an option) is the ability to not only format but also parse relative time. Given an anchor date, a relative time string, and locale — can we reverse it back to a date object? |
@justin-schroeder Sorry, but I don't clearly understand. Could you please provide some code examples and explain what they need to show? ❤️ |
@romanhrynevych basically I’d like tempo to be able to parse anything it formats, and format anything it parses. This allows users to create bi-directional interfaces which is a real-world use case I often have myself. A basic example:
Obviously origin date would default to |
@justin-schroeder great idea but I don't think how to implement it 😞 Now we have wrapper around native functions, receive different locale, languages etc. But how we can parse it, if, for example, this library will be used in ukrainian project, |
Hi guys. This long awaited feature seems to be stalled due to a rather non-trivial issue. Maybe it's possible to separate relative time parsing into a separate issue and release relative time formatting features soon? |
any plan for this feature to get it's way to the package ? |
This PR will close #7
@justin-schroeder made this as
draft
, need review and some help with timezones, also now we relative time fornow
only, but maybe we need to expand it to different date optionally?Will wait for your thoughts, and update all then ❤️