Skip to content

Typescript definition allows quarter as unit of time #531

@choffmeister

Description

@choffmeister

Describe the bug

According to the typescript definition, this is valid:

val now = dayjs()
val nextQuarter = now.add(1, 'quarter')

now.valueOf() == nextQuarter.valueOf() // true

Expected behavior
Either the quarter calculation should work or the typescript definition should not allow passing 'quarter' as unit of time.

Information

  • Day.js Version: 1.8.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions