mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Clean up method comment and add type hints
This commit is contained in:
parent
b0da4e11b6
commit
36b9b79a69
1 changed files with 1 additions and 4 deletions
|
@ -91,10 +91,7 @@ def parse(
|
||||||
return date
|
return date
|
||||||
|
|
||||||
|
|
||||||
def is_valid_date(year, month, day):
|
def is_valid_date(year: int, month: int, day: int) -> bool:
|
||||||
"""
|
|
||||||
Checks if a string can be parsed as a date
|
|
||||||
"""
|
|
||||||
try:
|
try:
|
||||||
datetime.datetime(year, month, day)
|
datetime.datetime(year, month, day)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Reference in a new issue