iamkun / iamkun/dayjs

Feature: Provide option to disable rounding in humanize()

Open
#2,991 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

The humanize() method currently rounds values, e.g., 1.4 hours => "an hour".
It would be helpful to optionally disable rounding:

dayjs.duration(1.4, 'hour').humanize({ round: false });

This should produce "1 hour 24 minutes".

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.