Skip to content

duration

an amount of time

1
# duration: an amount of time
2
1h30m90 min
3
# between two dates
4
date("2027-01-01") - date("2026-12-25")7 d
Example outputCtrl+Enter to run
1
# date + or - a duration moves it
2
now + 90 min2026-11-04 13:42:41 -06:00
Example outputCtrl+Enter to run
  • diff what changed from text a to b, line by line, or nil if nothing did
  • diff what changed from bytes a to b, by hex dump row, or nil if nothing did
  • age how many whole years have passed since d, as for someone’s age from their birthday
  • diff the time from a to b in calendar terms
  • relative how far the date is from now, in words like “in 3 days” or “2 hours ago”
  • parts a duration split into the largest units that fit, up to three of days, hours, minutes and seconds
  • hms a duration as clock text, like 7:15:00, with hours that can pass 24

Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.