moment.js being mutable is a pain. What're people ...
# suitescript
c
moment.js being mutable is a pain. What're people using instead of moment?
👀 1
w
Being insistent with integration partners to accept/send a unix timestamp, so I don't ever have to mess around with conversions.
🤣 1
c
It would be nice if the whole world traded in UNIX timestamps but that's not massively relevant here.
e
I use day.js
m
Haven't used it personally but js-joda is also reported to work
w
👍 1
p
If you want performance use date-fns If you want timezone conversion luxon I used luxon because it supports timezone straight away. date-fns requires additional library to handle timezone.
s
I'm looking at switching to date-fns
c
I've decided I should set all custom field dates with the same timezone as the company configuration.
s
what is the company configuration changes?
p
You should build a small module to encapsulate the date conversion logic, and the module should always check the company configuration. This way, you’ll have a future-proof, maintainable solution for managing dates.