Add formatting for dates with precision 10 and 11
This commit is contained in:
parent
cc97f41f2b
commit
fe664be570
|
@ -123,6 +123,10 @@ def format_time(time_value: str, precision: int) -> str:
|
|||
return time_value
|
||||
year = t.year
|
||||
|
||||
if precision == 11:
|
||||
return t.strftime("%-d %B %Y")
|
||||
if precision == 10:
|
||||
return datetime.strptime(time_value[1:9] + "01", "%Y-%m-%d").strftime("%B %Y")
|
||||
if precision == 9:
|
||||
return str(year)
|
||||
if precision == 8:
|
||||
|
|
Loading…
Reference in a new issue