You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we working with blockchain date, the we set or get date in second but Javascript use date in milliseconds.
It's common we need to create a formating function transform second to milliseconds.
Ex:
javascript new Date(ethers.toNumber(timestamp) * 1000)
My proposal feature is create a parseDate and formatDate date to date implementing to be easier.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When we working with blockchain date, the we set or get date in second but Javascript use date in milliseconds.
It's common we need to create a formating function transform second to milliseconds.
Ex:
javascript
new Date(ethers.toNumber(timestamp) * 1000)
My proposal feature is create a
parseDate
andformatDate
date to date implementing to be easier.If it's a good idea I can implement this feature.
Beta Was this translation helpful? Give feedback.
All reactions