日付差分計算ツール
2つの日付間の正確な差分を日数、週数、月数で計算します。営業日数も含みます。
Date Calculations - 技術的な詳細
Date difference calculations account for varying month lengths and leap years. Working days exclude Saturdays and Sundays from the count.
コマンドラインでの代替方法
# Using GNU date echo $(( ( $(date -d '2024-12-31' +%s) - $(date -d '2024-01-01' +%s) ) / 86400 )) days # Using Python python3 -c "from datetime import date; print((date(2024,12,31) - date(2024,1,1)).days)"