Dnn.platform: Replace momentjs with dayjs

Created on 29 Jun 2020  路  7Comments  路  Source: dnnsoftware/Dnn.Platform

Description of problem

We are currently using Moment.js in various areas of DNN.

Description of solution

We should evaluate replacing with dayjs (which is much more lightweight and has a similar API).

The following are all the areas that need to be updated. We'll use this as a checklist for PRs (one PR per area).

Admin Experience

  • [ ] Dnn.EditBar.UI
  • [ ] Dnn.PersonaBar.UI
  • [ ] Dnn.React.Common
  • [ ] AdminLogs.Web
  • [ ] Pages.Web
  • [ ] Prompt.Web
  • [ ] Roles.Web
  • [x] Servers.Web #4104
  • [ ] SiteImportExport.Web
  • [ ] Sites.Web
  • [x] Users.Web #4108

Platform

  • [ ] DotNetNuke.Web
  • [ ] Website

Description of alternatives considered

n/a

Screenshots

n/a

Additional context

We could go from approximately 18.2 KB to 2 KB.

Affected browser

  • [x] Chrome
  • [x] Firefox
  • [x] Safari
  • [x] Internet Explorer
  • [x] Edge
Pinned AE > Dnn.EditBar.UI AE > Dnn.PersonaBar.UI AE > Dnn.React.Common AE > PersonaBar Ext > AdminLogs.Web AE > PersonaBar Ext > Pages.Web AE > PersonaBar Ext > Prompt.Web AE > PersonaBar Ext > Roles.Web AE > PersonaBar Ext > Servers.Web AE > PersonaBar Ext > SiteImportExport.Web AE > PersonaBar Ext > Sites.Web AE > PersonaBar Ext > Users.Web Platform > DotNetNuke.Web Platform > Website High Low Ready for Development Enhancement

All 7 comments

Yep, but... We need to test for calendars in other cultures, i know this is used some places and there has already been some reported issues about it. Other than that I totally vote for that.

https://momentjs.com/docs/#/-project-status/

Recently, Chrome Dev Tools started showing recommendations for replacing Moment for the size alone. We generally support this move.

We now generally consider Moment to be a legacy project in maintenance mode. It is not _dead_, but it is indeed _done_.

@bdukes thanks for documenting that here. I am going to go ahead and start seeing what I can do to replace it with dayjs. I am hoping it will be a fairly smooth transition. I have experienced this in several other projects so far and I am hoping this one to be the same.

We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically.
If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better DNN Platform for all. Thank you for your continued involvement and contributions!

This issue has been closed automatically due to inactivity (as mentioned 14 days ago). Feel free to re-open the issue if you believe it is still relevant.

@david-poindexter do you want this pinned?

That would be great- thanks @bdukes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moorecreative picture moorecreative  路  4Comments

mnouraei picture mnouraei  路  5Comments

david-poindexter picture david-poindexter  路  3Comments

DanielNelsonCantarus picture DanielNelsonCantarus  路  5Comments

coretoco picture coretoco  路  4Comments