Skip to content

[FEATURE] Replace legacy Moment.js with Day.js or date-fns to improve performance #5014

@sammy200-ui

Description

@sammy200-ui

The website currently uses Moment.js for date formatting and manipulation.
But its officially in maintenance mode since September 2020. The maintainers recommend using modern alternatives. ref

It also adds ~60KB (minified) to the bundle and is not tree-shakeable, meaning the entire library is included even when only a few functions are used. ref

I propose migrating to a modern, lightweight alternative like Day.js or date-fns.
Which have estimated 90%+ reduction in date library footprint and aligns with modern ecosystem .

We could use any of the two mentioned cause both are excellent libraries. Would like to discuss before working on with maintainer.

Yes, I am interested in making a pr!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions