codecov-commenter: # [Codecov](https://codecov.io/gh/jmoiron/humanize/pull/144?src=pr&el=h1) Report
> Merging [#144](https://codecov.io/gh/jmoiron/humanize/pull/144?src=pr&el=desc) into [master](https://codecov.io/gh/jmoiron/humanize/commit/56a06434c5e7026c70e674ec45975e5e27ae7e70&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/jmoiron/humanize/pull/144/graphs/tree.svg?width=650&height=150&src=pr&token=uL9HFbdqDq)](https://codecov.io/gh/jmoiron/humanize/pull/144?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #144      +/-   ##
==========================================
+ Coverage   99.28%   99.30%   +0.01%     
==========================================
  Files           9        9              
  Lines         421      429       +8     
==========================================
+ Hits          418      426       +8     
  Misses          3        3              
```

| Flag | Coverage Δ | |
|---|---|---|
| #GHA_Ubuntu | `99.30% <100.00%> (+0.01%)` | :arrow_up: |
| #GHA_Windows | `?` | |
| #GHA_macOS | `?` | |

| [Impacted Files](https://codecov.io/gh/jmoiron/humanize/pull/144?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/humanize/time.py](https://codecov.io/gh/jmoiron/humanize/pull/144/diff?src=pr&el=tree#diff-c3JjL2h1bWFuaXplL3RpbWUucHk=) | `100.00% <100.00%> (ø)` | |
| [tests/test\_time.py](https://codecov.io/gh/jmoiron/humanize/pull/144/diff?src=pr&el=tree#diff-dGVzdHMvdGVzdF90aW1lLnB5) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/jmoiron/humanize/pull/144?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/jmoiron/humanize/pull/144?src=pr&el=footer). Last update [56a0643...e0008fa](https://codecov.io/gh/jmoiron/humanize/pull/144?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

phijor: So... yeah, `black` seems to be fighting `flake8` here. I cannot put the test cases on multiple lines (`black` folds them into one), but having them folded into one line by `black` results in a trailing comma which `flake8` does not like. :exploding_head: 
hugovk: Thank you for the PR!

So `now` could be another timezone, or in the past or future. Would it be better to call it `when`?

For example `now=yesterday` or `now=next_week` might be better as `when=yesterday` or `when=next_week`?


> So... yeah, `black` seems to be fighting `flake8` here. I cannot put the test cases on multiple lines (`black` folds them into one), but having them folded into one line by `black` results in a trailing comma which `flake8` does not like. 🤯

Yeah, it's a bit annoying, I think https://github.com/psf/black/issues/1288 is the issue for that.
phijor: > Thank you for the PR!

Thank you for your feedback :) Date, time and timezones are confusing.

> So `now` could be another timezone, or in the past or future. Would it be better to call it `when`?
> 
> For example `now=yesterday` or `now=next_week` might be better as `when=yesterday` or `when=next_week`?

Calling it `when` sounds like a good idea. I'll push some changes and resolve conflicts in next few days.

My use case for this is as follows: I have a pair of `datetime` objects, `current_time` and `starting_time`. I cannot control which timezone they are in, but I can assume that it is the same for both of them. Now I want to print (in a human readable way) when `starting_time` happened, relative to `current_time`. Something like

```python
>>> (
    f"starting_time is {naturalday(starting_time)}, "
    f"which was {naturaltime(starting_time, when=current_time)}"
)
"starting_time is Jul 12, which was 10 days ago"
```

Usually it would make sense to just use `naturaltime(current_time - starting_time)`, but the current implementation (`date_and_delta`) insists on calculating a date relative to `_now()`, so that won't work. Maybe we can even work around that without having to add a `when` parameter by refactoring `date_and_delta`.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e21eccf..7af3b16 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,7 +6,7 @@ repos:
         args: ["--py36-plus"]
 
   - repo: https://github.com/psf/black
-    rev: 19.10b0
+    rev: 20.8b1
     hooks:
       - id: black
         args: ["--target-version", "py36"]
diff --git a/src/humanize/time.py b/src/humanize/time.py
index b0bf85b..bc1922c 100644
--- a/src/humanize/time.py
+++ b/src/humanize/time.py
@@ -81,7 +81,7 @@ def date_and_delta(value, *, now=None):
     return date, abs_timedelta(delta)
 
 
-def naturaldelta(value, months=True, minimum_unit="seconds"):
+def naturaldelta(value, months=True, minimum_unit="seconds", when=None):
     """Return a natural representation of a timedelta or number of seconds.
 
     This is similar to `naturaltime`, but does not add tense to the result.
@@ -91,16 +91,30 @@ def naturaldelta(value, months=True, minimum_unit="seconds"):
         months (bool): If `True`, then a number of months (based on 30.5 days) will be
             used for fuzziness between years.
         minimum_unit (str): The lowest unit that can be used.
+        when (datetime.timedelta): Point in time relative to which _value_ is
+            interpreted.  Defaults to the current time in the local timezone.
 
     Returns:
         str: A natural representation of the amount of time elapsed.
+
+    Examples
+        Compare two timestamps in a custom local timezone::
+
+        import datetime as dt
+        from dateutil.tz import gettz
+
+        berlin = gettz("Europe/Berlin")
+        now = dt.datetime.now(tz=berlin)
+        later = now + dt.timedelta(minutes=30)
+
+        assert naturaldelta(later, when=now) == "30 minutes"
     """
     tmp = Unit[minimum_unit.upper()]
     if tmp not in (Unit.SECONDS, Unit.MILLISECONDS, Unit.MICROSECONDS):
         raise ValueError(f"Minimum unit '{minimum_unit}' not supported")
     minimum_unit = tmp
 
-    date, delta = date_and_delta(value)
+    date, delta = date_and_delta(value, now=when)
     if date is None:
         return value
 
@@ -173,7 +187,7 @@ def naturaldelta(value, months=True, minimum_unit="seconds"):
         return ngettext("%d year", "%d years", years) % years
 
 
-def naturaltime(value, future=False, months=True, minimum_unit="seconds"):
+def naturaltime(value, future=False, months=True, minimum_unit="seconds", when=None):
     """Return a natural representation of a time in a resolution that makes sense.
 
     This is more or less compatible with Django's `naturaltime` filter.
@@ -186,11 +200,13 @@ def naturaltime(value, future=False, months=True, minimum_unit="seconds"):
         months (bool): If `True`, then a number of months (based on 30.5 days) will be
             used for fuzziness between years.
         minimum_unit (str): The lowest unit that can be used.
+        when (datetime.datetime): Point in time relative to which _value_ is
+            interpreted.  Defaults to the current time in the local timezone.
 
     Returns:
         str: A natural representation of the input in a resolution that makes sense.
     """
-    now = _now()
+    now = when or _now()
     date, delta = date_and_delta(value, now=now)
     if date is None:
         return value
@@ -199,7 +215,7 @@ def naturaltime(value, future=False, months=True, minimum_unit="seconds"):
         future = date > now
 
     ago = _("%s from now") if future else _("%s ago")
-    delta = naturaldelta(delta, months, minimum_unit)
+    delta = naturaldelta(delta, months, minimum_unit, when=when)
 
     if delta == _("a moment"):
         return _("now")

The package (wrongly) assumes all times are in the local timezone
diff --git a/tests/test_time.py b/tests/test_time.py
index bf5a853..90c0130 100644
--- a/tests/test_time.py
+++ b/tests/test_time.py
@@ -24,6 +24,8 @@ ONE_YEAR = 365.25 * ONE_DAY
 
 with freeze_time("2020-02-02"):
     NOW = dt.datetime.now()
+    NOW_UTC = dt.datetime.now(tz=dt.timezone.utc)
+    NOW_UTC_PLUS_01_00 = dt.datetime.now(tz=dt.timezone(offset=dt.timedelta(hours=1)))
     TODAY = dt.date.today()
     TOMORROW = TODAY + ONE_DAY_DELTA
     YESTERDAY = TODAY - ONE_DAY_DELTA
@@ -331,6 +333,37 @@ def test_naturaldelta_minimum_unit_explicit(minimum_unit, seconds, expected):
     assert humanize.naturaldelta(delta, minimum_unit=minimum_unit) == expected
 
 
+@pytest.mark.parametrize(
+    "test_input, when, expected",
+    [
+        (NOW, NOW, "a moment"),
+        (NOW_UTC, NOW_UTC, "a moment"),
+    ],
+)
+def test_naturaldelta_when_explicit(test_input, when, expected):
+    # Act / Assert
+    assert humanize.naturaldelta(test_input, when=when) == expected
+
+
+@pytest.mark.parametrize(
+    "value, when",
+    [
+        (NOW_UTC, None),
+        (NOW_UTC, NOW),
+        (NOW_UTC_PLUS_01_00, None),
+        (NOW_UTC_PLUS_01_00, NOW),
+    ],
+)
+def test_naturaldelta_when_missing_tzinfo(value, when):
+    """Subtraction `when - value` is not defined by the `datetime` module when
+    either operand has not timezone-info (`tz=None`) and raises a TypeError.
+    """
+
+    # Act / Assert
+    with pytest.raises(TypeError):
+        humanize.naturaldelta(value, when=when)
+
+
 @pytest.mark.parametrize(
     "seconds, expected",
     [

pip install -e .[tests]
parse_log_pytest
pytest
pytest pytest-cov
3.8
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
coverage==7.6.1
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
freezegun==1.5.1
-e git+https://github.com/jmoiron/humanize.git@55b3e1cef144f34f8f4af6bfc87972ccafd6771d#egg=humanize
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
packaging @ file:///croot/packaging_1720101850331/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042571233/work
pytest @ file:///croot/pytest_1717793244625/work
pytest-cov==5.0.0
python-dateutil==2.9.0.post0
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work

name: humanize
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py38h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.1=py38h06a4308_0
  - pip=24.2=py38h06a4308_0
  - pluggy=1.0.0=py38h06a4308_1
  - pytest=7.4.4=py38h06a4308_0
  - python=3.8.20=he870216_0
  - readline=8.2=h5eee18b_0
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py38h06a4308_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.6.1
      - freezegun==1.5.1
      - humanize==3.0.1
      - pytest-cov==5.0.0
      - python-dateutil==2.9.0.post0
      - six==1.17.0
prefix: /opt/conda/envs/humanize

tests/test_time.py::test_naturaldelta_when_explicit[test_input0-when0-a tests/test_time.py::test_naturaldelta_when_explicit[test_input1-when1-a
tests/test_time.py::test_date_and_delta tests/test_time.py::test_naturaldelta_nomonths[test_input0-7 tests/test_time.py::test_naturaldelta_nomonths[test_input1-31 tests/test_time.py::test_naturaldelta_nomonths[test_input2-230 tests/test_time.py::test_naturaldelta_nomonths[test_input3-1 tests/test_time.py::test_naturaldelta[0-a tests/test_time.py::test_naturaldelta[1-a tests/test_time.py::test_naturaldelta[30-30 tests/test_time.py::test_naturaldelta[test_input3-a tests/test_time.py::test_naturaldelta[test_input4-2 tests/test_time.py::test_naturaldelta[test_input5-an tests/test_time.py::test_naturaldelta[test_input6-23 tests/test_time.py::test_naturaldelta[test_input7-a tests/test_time.py::test_naturaldelta[test_input8-1 tests/test_time.py::test_naturaldelta[test_input9-2 tests/test_time.py::test_naturaldelta[test_input10-a tests/test_time.py::test_naturaldelta[test_input11-30 tests/test_time.py::test_naturaldelta[test_input12-a tests/test_time.py::test_naturaldelta[test_input13-2 tests/test_time.py::test_naturaldelta[test_input14-an tests/test_time.py::test_naturaldelta[test_input15-23 tests/test_time.py::test_naturaldelta[test_input16-a tests/test_time.py::test_naturaldelta[test_input17-1 tests/test_time.py::test_naturaldelta[test_input18-2 tests/test_time.py::test_naturaldelta[test_input19-27 tests/test_time.py::test_naturaldelta[test_input20-1 tests/test_time.py::test_naturaldelta[test_input22-2 tests/test_time.py::test_naturaldelta[test_input23-1 tests/test_time.py::test_naturaldelta[test_input24-a tests/test_time.py::test_naturaldelta[test_input25-2 tests/test_time.py::test_naturaldelta[test_input26-9 tests/test_time.py::test_naturaldelta[test_input27-a tests/test_time.py::test_naturaldelta[NaN-NaN] tests/test_time.py::test_naturaltime[test_input0-now] tests/test_time.py::test_naturaltime[test_input1-a tests/test_time.py::test_naturaltime[test_input2-30 tests/test_time.py::test_naturaltime[test_input3-a tests/test_time.py::test_naturaltime[test_input4-2 tests/test_time.py::test_naturaltime[test_input5-an tests/test_time.py::test_naturaltime[test_input6-23 tests/test_time.py::test_naturaltime[test_input7-a tests/test_time.py::test_naturaltime[test_input8-1 tests/test_time.py::test_naturaltime[test_input9-2 tests/test_time.py::test_naturaltime[test_input10-a tests/test_time.py::test_naturaltime[test_input11-30 tests/test_time.py::test_naturaltime[test_input12-a tests/test_time.py::test_naturaltime[test_input13-2 tests/test_time.py::test_naturaltime[test_input14-an tests/test_time.py::test_naturaltime[test_input15-23 tests/test_time.py::test_naturaltime[test_input16-a tests/test_time.py::test_naturaltime[test_input17-1 tests/test_time.py::test_naturaltime[test_input18-2 tests/test_time.py::test_naturaltime[test_input19-27 tests/test_time.py::test_naturaltime[test_input20-1 tests/test_time.py::test_naturaltime[30-30 tests/test_time.py::test_naturaltime[test_input22-2 tests/test_time.py::test_naturaltime[test_input23-1 tests/test_time.py::test_naturaltime[NaN-NaN] tests/test_time.py::test_naturaltime_nomonths[test_input0-now] tests/test_time.py::test_naturaltime_nomonths[test_input1-a tests/test_time.py::test_naturaltime_nomonths[test_input2-30 tests/test_time.py::test_naturaltime_nomonths[test_input3-a tests/test_time.py::test_naturaltime_nomonths[test_input4-2 tests/test_time.py::test_naturaltime_nomonths[test_input5-an tests/test_time.py::test_naturaltime_nomonths[test_input6-23 tests/test_time.py::test_naturaltime_nomonths[test_input7-a tests/test_time.py::test_naturaltime_nomonths[test_input8-17 tests/test_time.py::test_naturaltime_nomonths[test_input9-47 tests/test_time.py::test_naturaltime_nomonths[test_input10-1 tests/test_time.py::test_naturaltime_nomonths[test_input11-2 tests/test_time.py::test_naturaltime_nomonths[test_input12-a tests/test_time.py::test_naturaltime_nomonths[test_input13-30 tests/test_time.py::test_naturaltime_nomonths[test_input14-a tests/test_time.py::test_naturaltime_nomonths[test_input15-2 tests/test_time.py::test_naturaltime_nomonths[test_input16-an tests/test_time.py::test_naturaltime_nomonths[test_input17-23 tests/test_time.py::test_naturaltime_nomonths[test_input18-a tests/test_time.py::test_naturaltime_nomonths[test_input19-1 tests/test_time.py::test_naturaltime_nomonths[test_input20-2 tests/test_time.py::test_naturaltime_nomonths[test_input21-27 tests/test_time.py::test_naturaltime_nomonths[test_input22-1 tests/test_time.py::test_naturaltime_nomonths[30-30 tests/test_time.py::test_naturaltime_nomonths[test_input24-2 tests/test_time.py::test_naturaltime_nomonths[test_input25-1 tests/test_time.py::test_naturaltime_nomonths[NaN-NaN] tests/test_time.py::test_naturalday[test_args0-today] tests/test_time.py::test_naturalday[test_args1-tomorrow] tests/test_time.py::test_naturalday[test_args2-yesterday] tests/test_time.py::test_naturalday[test_args3-Mar tests/test_time.py::test_naturalday[test_args4-02/26/1984] tests/test_time.py::test_naturalday[test_args5-1982.06.27] tests/test_time.py::test_naturalday[test_args6-None] tests/test_time.py::test_naturalday[test_args7-Not tests/test_time.py::test_naturalday[test_args8-expected8] tests/test_time.py::test_naturalday[test_args9-expected9] tests/test_time.py::test_naturaldate[test_input0-today] tests/test_time.py::test_naturaldate[test_input1-tomorrow] tests/test_time.py::test_naturaldate[test_input2-yesterday] tests/test_time.py::test_naturaldate[test_input3-Mar tests/test_time.py::test_naturaldate[test_input4-Jun tests/test_time.py::test_naturaldate[None-None] tests/test_time.py::test_naturaldate[Not tests/test_time.py::test_naturaldate[test_input7-expected7] tests/test_time.py::test_naturaldate[test_input8-expected8] tests/test_time.py::test_naturaldate[test_input9-Feb tests/test_time.py::test_naturaldate[test_input10-Mar tests/test_time.py::test_naturaldate[test_input11-Apr tests/test_time.py::test_naturaldate[test_input12-May tests/test_time.py::test_naturaldate[test_input13-Jun tests/test_time.py::test_naturaldate[test_input14-Jul tests/test_time.py::test_naturaldate[test_input15-Aug tests/test_time.py::test_naturaldate[test_input16-Sep tests/test_time.py::test_naturaldate[test_input17-Oct tests/test_time.py::test_naturaldate[test_input18-Nov tests/test_time.py::test_naturaldate[test_input19-Dec tests/test_time.py::test_naturaldate[test_input20-Jan tests/test_time.py::test_naturaldate[test_input21-today] tests/test_time.py::test_naturaldate[test_input22-Mar tests/test_time.py::test_naturaldate[test_input23-Apr tests/test_time.py::test_naturaldate[test_input24-May tests/test_time.py::test_naturaldate[test_input25-Jun tests/test_time.py::test_naturaldate[test_input26-Jul tests/test_time.py::test_naturaldate[test_input27-Aug tests/test_time.py::test_naturaldate[test_input28-Sep tests/test_time.py::test_naturaldate[test_input29-Oct tests/test_time.py::test_naturaldate[test_input30-Nov tests/test_time.py::test_naturaldate[test_input31-Dec tests/test_time.py::test_naturaldate[test_input32-Jan tests/test_time.py::test_naturaldate[test_input33-Feb tests/test_time.py::test_naturaldelta_minimum_unit_default[1e-06-a tests/test_time.py::test_naturaldelta_minimum_unit_default[4e-06-a tests/test_time.py::test_naturaldelta_minimum_unit_default[0.001-a tests/test_time.py::test_naturaldelta_minimum_unit_default[0.004-a tests/test_time.py::test_naturaldelta_minimum_unit_default[2-2 tests/test_time.py::test_naturaldelta_minimum_unit_default[4-4 tests/test_time.py::test_naturaldelta_minimum_unit_default[3600.004-an tests/test_time.py::test_naturaldelta_minimum_unit_default[86400.004-a tests/test_time.py::test_naturaldelta_minimum_unit_default[31557600.000004-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-1e-06-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-4e-06-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-0.001-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-0.004-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-0.101943-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-1.337-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-2-2 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-4-4 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-3600.004-an tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-86400.004-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[seconds-31557600.000004-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-4e-06-0 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-0.001-1 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-0.004-4 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-0.101943-101 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-1.337-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-2-2 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-4-4 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-3600.004-an tests/test_time.py::test_naturaldelta_minimum_unit_explicit[milliseconds-31557600.000004-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-1e-06-1 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-4e-06-4 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-0.004-4 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-0.101943-101 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-1.337-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-2-2 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-4-4 tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-3600.004-an tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-86400.004-a tests/test_time.py::test_naturaldelta_minimum_unit_explicit[microseconds-31557600.000004-a tests/test_time.py::test_naturaldelta_when_missing_tzinfo[value0-None] tests/test_time.py::test_naturaldelta_when_missing_tzinfo[value1-when1] tests/test_time.py::test_naturaldelta_when_missing_tzinfo[value2-None] tests/test_time.py::test_naturaldelta_when_missing_tzinfo[value3-when3] tests/test_time.py::test_naturaltime_minimum_unit_default[1e-06-now] tests/test_time.py::test_naturaltime_minimum_unit_default[4e-06-now] tests/test_time.py::test_naturaltime_minimum_unit_default[0.001-now] tests/test_time.py::test_naturaltime_minimum_unit_default[0.004-now] tests/test_time.py::test_naturaltime_minimum_unit_default[2-2 tests/test_time.py::test_naturaltime_minimum_unit_default[4-4 tests/test_time.py::test_naturaltime_minimum_unit_default[3600.004-an tests/test_time.py::test_naturaltime_minimum_unit_default[86400.004-a tests/test_time.py::test_naturaltime_minimum_unit_default[31557600.000004-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-1e-06-now] tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-4e-06-now] tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-0.001-now] tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-0.004-now] tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-0.101943-now] tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-1.337-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-2-2 tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-4-4 tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-3600.004-an tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-86400.004-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[seconds-31557600.000004-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-4e-06-0 tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-0.001-1 tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-0.004-4 tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-0.101943-101 tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-1.337-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-2-2 tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-4-4 tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-3600.004-an tests/test_time.py::test_naturaltime_minimum_unit_explicit[milliseconds-31557600.000004-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-1e-06-1 tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-4e-06-4 tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-0.004-4 tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-0.101943-101 tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-1.337-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-2-2 tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-4-4 tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-3600.004-an tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-86400.004-a tests/test_time.py::test_naturaltime_minimum_unit_explicit[microseconds-31557600.000004-a tests/test_time.py::test_precisedelta_one_unit_enough[val0-microseconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[val1-microseconds-2 tests/test_time.py::test_precisedelta_one_unit_enough[val2-microseconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[val3-microseconds-2 tests/test_time.py::test_precisedelta_one_unit_enough[val4-seconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[1-seconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[2-seconds-2 tests/test_time.py::test_precisedelta_one_unit_enough[60-seconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[120-seconds-2 tests/test_time.py::test_precisedelta_one_unit_enough[3600-seconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[7200-seconds-2 tests/test_time.py::test_precisedelta_one_unit_enough[86400-seconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[172800-seconds-2 tests/test_time.py::test_precisedelta_one_unit_enough[31536000-seconds-1 tests/test_time.py::test_precisedelta_one_unit_enough[63072000-seconds-2 tests/test_time.py::test_precisedelta_multiple_units[val0-microseconds-1 tests/test_time.py::test_precisedelta_multiple_units[val1-microseconds-2 tests/test_time.py::test_precisedelta_multiple_units[val2-microseconds-1 tests/test_time.py::test_precisedelta_multiple_units[val3-microseconds-4 tests/test_time.py::test_precisedelta_multiple_units[val4-microseconds-5 tests/test_time.py::test_precisedelta_multiple_units[val5-microseconds-1 tests/test_time.py::test_precisedelta_multiple_units[val6-microseconds-1 tests/test_time.py::test_precisedelta_multiple_units[val7-microseconds-1 tests/test_time.py::test_precisedelta_custom_format[val0-milliseconds-%0.4f-1.0010 tests/test_time.py::test_precisedelta_custom_format[val1-milliseconds-%0.4f-2.0020 tests/test_time.py::test_precisedelta_custom_format[val2-milliseconds-%0.2f-2.00 tests/test_time.py::test_precisedelta_custom_format[val3-seconds-%0.2f-1.23 tests/test_time.py::test_precisedelta_custom_format[val4-seconds-%0.2f-4 tests/test_time.py::test_precisedelta_custom_format[val5-seconds-%0.2f-5 tests/test_time.py::test_precisedelta_custom_format[val6-hours-%0.2f-5 tests/test_time.py::test_precisedelta_custom_format[val7-days-%0.2f-5.19 tests/test_time.py::test_precisedelta_custom_format[val8-months-%0.2f-3.93 tests/test_time.py::test_precisedelta_custom_format[val9-years-%0.1f-0.5 tests/test_time.py::test_precisedelta_suppress_units[val0-microseconds-suppress0-1 tests/test_time.py::test_precisedelta_suppress_units[val1-microseconds-suppress1-1200 tests/test_time.py::test_precisedelta_suppress_units[val2-microseconds-suppress2-1.20 tests/test_time.py::test_precisedelta_suppress_units[val3-microseconds-suppress3-1000 tests/test_time.py::test_precisedelta_suppress_units[val4-microseconds-suppress4-1 tests/test_time.py::test_precisedelta_suppress_units[val5-microseconds-suppress5-1.20 tests/test_time.py::test_precisedelta_suppress_units[val6-microseconds-suppress6-4 tests/test_time.py::test_precisedelta_suppress_units[val7-microseconds-suppress7-4 tests/test_time.py::test_precisedelta_suppress_units[val8-microseconds-suppress8-4 tests/test_time.py::test_precisedelta_suppress_units[val9-microseconds-suppress9-240 tests/test_time.py::test_precisedelta_suppress_units[val10-microseconds-suppress10-240.50 tests/test_time.py::test_precisedelta_bogus_call tests/test_time.py::test_time_unit
.pre-commit-config.yaml src/humanize/time.py
.pre-commit-config.yaml src/humanize/time.py