Skip to content

Add precision to DateTime.Humanize  #101

Closed
@MehdiK

Description

@MehdiK

e.g. (55 days).Humanize(precision:5) => "2 months" (instead of one month)

We also need to apply a sensible default based on each unit; e.g.

  • 5 for days so 55 days reports as 2 months
  • 2 for months so 22 months reports as 2 years

Also perhaps these defaults should be lower for singular units; e.g. 25 days shouldn't report as one month; but 29 days perhaps could report as one month while 55 days reports as 2 months! A bit unsure about this as it might get a bit confusing.

Either way this is a breaking change and as such set for V2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions