Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Quiz_Legacy::get_date_diff( mixed $time1, mixed $time2, integer $precision = 2 )

Get human readable time difference between 2 dates

Description Description

Return difference between 2 dates in year, month, hour, minute or second The $precision caps the number of time units used: for instance if $time1 – $time2 = 3 days, 4 hours, 12 minutes, 5 seconds

  • with precision = 1 : 3 days
  • with precision = 2 : 3 days, 4 hours
  • with precision = 3 : 3 days, 4 hours, 12 minutes


Top ↑

Parameters Parameters


(mixed) (Required) a time (string or timestamp)


(mixed) (Required) a time (string or timestamp)


(integer) (Optional) precision

Default value: 2

Top ↑

Return Return

(string) time difference

Top ↑

Source Source

File: includes/class.llms.quiz.legacy.php

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.