Skip to content

avancedFormat plugin is interpolating content inside square brackets #554

Description

@mariomc

Describe the bug
advancedFormat and buddhistEra plugins are changing/interpolating content inside square brackets

// with advancedFormat
const dayJSformat = dayjs.format('[Saturday]') // outputs: outputs something like "1418400000aturday"
const momentFormat = moment.format('[Saturday]') // outputs: "Saturday"
expect(dayJSformat).toEqual(momentFormat) // throws

Expected behavior
any plugins extending the format method interpolation should uphold behavior of the original format method and not change/interpolate content inside square brackets

Information

  • Day.js Version: all
  • OS: all
  • Browser: all

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions