Comments (4)
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).
from tempo.
Thanks for the report. Would you mind sharing what browser and version you are using?
from tempo.
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")
from tempo.
This should be fixed now. parse had a default locale of en
instead of device
.
from tempo.
Related Issues (20)
- Incorrect formatting between local DST boundaries
- Generate exports size table for docs HOT 2
- Bugfix deviceTZ undefined case error HOT 3
- Unnecessary code in bundles HOT 5
- Are there any plans to support timezone formats like +-HH:mm in the parse function?
- Feature Request: Difference between datetimes HOT 1
- format YYYY-MM returns YYYY-M HOT 3
- yearStart and yearEnd may need to be added to types - v0.1.15 HOT 2
- Feature request: weekNumber HOT 8
- Feature request: `differenceInMilliseconds` / `differenceInSeconds` / `differenceInMinutes` / etc. HOT 1
- FeatureReuet: Support for timezone format +-HH:mm in format token. HOT 1
- Filtering out year still includes comma HOT 2
- Invalid offset error for +0000 HOT 2
- Optional argument in `is*` functions HOT 3
- Format with `a` or `A` are different locally vs CI HOT 2
- When user timezone is `Europe/Lisbon`, the tempo's `range` function throws an "Invalid offset" exception. HOT 6
- Feature Request : Duration format HOT 1
- Error: Invalid time zone specified: Etc/Unknown HOT 1
- Override the default timezone HOT 2
- "diffMinutes does not exist" error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tempo.