Return english description of given time relative to now

time:format_relative(STRING $time) : STRING

# note: if needed, this function automatically transforms given time into UTC by checking your application time zone settings
time:now()
#=> "2019-09-24 01:24:28"

$past_date = "2019-09-20 01:10:52"

time:format_relative($past_date)
#=> "3 months, 16 days, 22 hours, 52 minutes, 17 seconds ago"

time:format_relative(time:create("+10 hours"))
#=> "in 10 hours"

Copyright ©2013-2022 SunSed®. All rights reserved.