Comments (7)
Great, another breaks in one browser and not the other 😂. I wonder if this is from me updating the dependencies or if it has been like this for a while 🤔
from communitymission-progress-viewer.
Why do we need that dayjs lib anyway? Can the native browser date API not do something this lib can?
from communitymission-progress-viewer.
There's also some invalid dates on Chrome, but there's more of them on Firefox.
If I know the requirements I could probably write up some code for time formatting which you could then implement here. Or maybe I can even fix the bug myself in the code, but I need to know what the expected format and the original purpose of this dayjs library is.
from communitymission-progress-viewer.
Interesting, I don't see any invalid dates in chrome
The date format (in the incident section) is dependent on whether or not there should be a time displayed. So either a long time (YYYY-MM-DD HH:mm) if the time is known or just a short date (YYYY-MM-DD) if it was a whole day issue. In other places the date format is different, just because of limited space 😅. I am pretty sure that I used dayJS just because I was lazy, looks like only the formatDate, addDays and dateIsBefore functions are used. So if you rewrite them (in the helper/dateHelper.ts
file), then dayJS can easily be removed 😋
I think the bug comes from the .toLocaleString()
method. I used it to represent the UTC date from the back-end into time that is in the user's timezone. Your system's date format is probably different to mine, which is probably slightly different between Chrome and Firefox 🤔
from communitymission-progress-viewer.
Maybe because our browsers are set to different languages. Testing this stuff is really hard, since it can work fine in one language, but break for another (like in this case, or for the UD22 website I made last year)
from communitymission-progress-viewer.
Yeah, I need to move away from parsing the dates 🤔. It was just so much easier to read than using the Date.UTC() 😅
from communitymission-progress-viewer.
And this is probably not helping 😂
from communitymission-progress-viewer.
Related Issues (1)
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 communitymission-progress-viewer.