-
-
Notifications
You must be signed in to change notification settings - Fork 704
Closed
Labels
Description
Issue Description
Humanize doesn't seem to support granularity of "quarter".
But the error raised seems to suggest that it does:
if not granularity:
raise ValueError(
"Empty granularity list provided. "
"Please select one or more from ['second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year']."
)>>> arrow.Arrow.utcnow().humanize(granularity=["quarter"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/krisfremen/projects/arrow/arrow/arrow.py", line 1251, in humanize
raise ValueError(
ValueError: Invalid level of granularity. Please select between 'second', 'minute', 'hour', 'day', 'week', 'month' or 'year'.
>>> arrow.Arrow.utcnow().humanize(granularity=None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/krisfremen/projects/arrow/arrow/arrow.py", line 1263, in humanize
raise ValueError(
ValueError: Empty granularity list provided. Please select one or more from ['second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'].System Info
- 🖥 OS name and version: Debian 10.10
- 🐍 Python version: Python 3.9.1
- 🏹 Arrow version: 1.1.1 or master