Skip to content

duration.humanize(): returns "a month" for NaN #3006

@mfulton26

Description

@mfulton26

Describe the bug

> dayjs.duration(NaN).humanize()
"a month"

Expected behavior

> dayjs.duration(NaN).humanize()
"invalid duration"

Information

  • Day.js Version: 1.11.19
  • OS: macOS 26.3
  • Runtime: deno 2.6.9
  • Time zone: GMT-06:00 CST (Central Standard Time)

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