Skip to content

Can't input negative years #2636

@willismonroe

Description

@willismonroe

Describe the bug
I'm trying to work with negative years in a mermaid-js gantt chart but tracing down their date parsing lead me to dayjs. Right now I can get a negative year to display by subtracting years from a positive year date, but there seems to be no way to parse a negative year from the outset.

Expected behavior
I would like to be able to enter dayjs('-2600') and get (NB I don't know if it's a friday) Fri, 01 Jan -2600 00:00:00 GMT.

Information

  • Day.js Version: 1.11.10
  • OS: Linux
  • Browser: Chrome 124

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions