Days Between two dates one year apart
Reference: how many days are in one calendar year. Computed below across multiple units; if either date is "today", the page reflects the build date.
January 1, 2024 → January 1, 2025
366 days
In Other Units
| Total seconds | 31,622,400 |
|---|---|
| Total hours | 8,784 |
| Total days | 366 |
| Total weeks | 52.3 |
| Total months (calendar) | 12 |
| Total years (calendar) | 1 |
How to Calculate This in Code
JavaScript (with day.js)
dayjs('2025-01-01').diff(dayjs('2024-01-01'), 'day')
// 366
Python
from datetime import date (date(2025, 1, 1) - date(2024, 1, 1)).days # 366
Bash (GNU date)
echo $(( ($(date -d '2025-01-01' +%s) - $(date -d '2024-01-01' +%s)) / 86400 )) # 366