[Feature]: Relative time formatting#27
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 fornowonly, but maybe we need to expand it to different date optionally?Will wait for your thoughts, and update all then ❤️