Skip to content Skip to footer navigation

Hours Ago Modifier

Returns the number of hours since a given date variable. Statamic will attempt to parse any string as a date, but try to keep it in the least ambiguous date format possible.

# Assuming the current time is June 20, 2012 at midnight.
date: June 19 2012
{{ date | hours_ago }}
{{ Statamic::modify($date)->hoursAgo() }}
24