mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-13 18:19:47 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
aae2164cb2
commit
9c0424c75b
@ -40,9 +40,9 @@ def calculate_age(unix_timestamp: float) -> str:
|
|||||||
# Calculate the age
|
# Calculate the age
|
||||||
current_date = datetime.now(tz=UTC)
|
current_date = datetime.now(tz=UTC)
|
||||||
age = (
|
age = (
|
||||||
current_date.year -
|
current_date.year
|
||||||
birth_date.year -
|
- birth_date.year
|
||||||
((current_date.month, current_date.day) < (birth_date.month, birth_date.day))
|
- ((current_date.month, current_date.day) < (birth_date.month, birth_date.day))
|
||||||
)
|
)
|
||||||
return str(age)
|
return str(age)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user