Skip to content

naturaltime: wrong translation with delta >= 2 years #21

@Mathieu-Ghaleb

Description

@Mathieu-Ghaleb

What did you do?

Ran the following code:

import humanize
import datetime as dt

humanize.i18n.activate("fr_FR")
output = humanize.naturaltime(dt.datetime(year=2010, month=1, day=1))
print(output)

What did you expect to happen?

Output to be:

il y a 12 ans

What actually happened?

Output was:

il y a 12 years

What versions are you using?

  • OS: Mac OS
  • Python: 3.8.6
  • Humanize: 4.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions