Update get_top_billionaires.py

This commit is contained in:
Charlie Miller 2024-01-15 09:24:18 +00:00 committed by GitHub
parent 24b3d42ff2
commit d8b299d671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,11 +26,11 @@ def years_old(unix_timestamp: float) -> str:
Age as string Age as string
>>> from datetime import datetime, UTC >>> from datetime import datetime, UTC
>>> 2024 - int(calculate_age(946684800)) >>> 2024 - int(years_old(946684800))
2000 2000
>>> 2024 - int(calculate_age(-2145703316)) >>> 2024 - int(years_old(-2145703316))
1902 1902
>>> 2024 - int(calculate_age(2209202284)) >>> 2024 - int(years_old(2209202284))
2040 2040
""" """
birth_date = datetime.fromtimestamp(unix_timestamp, tz=UTC) birth_date = datetime.fromtimestamp(unix_timestamp, tz=UTC)