Example on front page broken in German (and possibly other languages)
Closed this issue · 4 comments
AaronDewes commented
andrew-boyd commented
Thanks for the report. Would you mind sharing what browser and version you are using?
AaronDewes commented
I can reproduce this in Chrome 121 and Firefox 122. I also amended the issue with the root cause:
format()
seems to default to the browser language.
parse()
should do that too in my opinion, and fall back to English if the local language fails (or something else, what's the intended behaviour is your decision, but a broken example isn't good in my opinion).
AaronDewes commented
You could also just change the example to be
import { format, parse } from "@formkit/tempo"
const readable = format(new Date(), "full")
parse(readable, "full", "device")
or
import { format, parse } from "@formkit/tempo"
const readable = format(new Date(), "full", "en")
parse(readable, "full")
justin-schroeder commented
This should be fixed now. parse had a default locale of en
instead of device
.