-
Notifications
You must be signed in to change notification settings - Fork 9
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from moment
to native Date
object backed with date-fns
#1580
Conversation
Momentjs is now in maintenance mode only https://momentjs.com/docs/#/-project-status/
date-fns has a slightly different format, as documented here https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md#popular-mistakes
service metrics filter range on first view (last 24 hours):
|
5b9166c
to
925e2cb
Compare
925e2cb
to
c06836d
Compare
I believe this is now fixed :)
Actually that's a good spot. If this was to be 10000000s it would still not normalise... I've implemented a hack to take care of it.
I would hope so 馃槵
I think I'm cool with that too 馃 |
graphs look look on dev01, metrics range times are UTC (BST -1), csv timestamp looks ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
massive piece of work 馃挴
What
moment
is EOL. We should be moving off it.moment
, although has served its purpose, has been somewhat opinionated and specific, which caused our codebase to purely rely onmoment.Moment
andmoment.Duration
types. This makes it difficult to move off, upgrade or maintain the code.We've had a chat, and decided that native
Date
, should be preferably used throughout the codebase, to maintain the simplicity and potential for us to migrate/maintain when necessary.I've started off, with writing few simple functions, such as
format
,add
,subtract
,duration
- just to make the usage ofDate
a little simpler. But that list started to expand slowly and realistically... has been solved elsewhere. So instead of wasting time, I took a smaller steps and the time, and opted in fordate-fns
. Fell in love on the way.As part of this, while manually having to change the usage of
moment
, my eyes were hurt by some linting highlights, so I've fixed them on the way.How to review
馃毃鈿狅笍 Please do not merge this pull request via the GitHub UI 鈿狅笍 馃毃