Skip to content

the result of dayjs("2019-02", "YYYY-MM") is wrong #761

Closed
@kingller

Description

Describe the bug

import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat";
dayjs.extend(customParseFormat);

2019-02 dayjs format: {dayjs("2019-02", "YYYY-MM").format("YYYY-MM")}

result: 2019-03
expected: 2019-02

Information

  • Day.js Version 1.1.18
  • OS: mac
  • Browser: chrome 79.0.3945.88
  • Time: 2019-12-30T15:30:00+08:00

Reproduce address: https://codesandbox.io/s/gifted-feynman-bshbk?fontsize=14&hidenavigation=1&theme=dark

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions