Table of contents
  1. 1. Usage Restrictions
  2. 2. Parameters
  3. 3. Result
  4. 4. Samples
date.DiffSeconds(first : str, second : str) : num

Compute the difference between the first and second date in seconds.

Usage Restrictions

1.9.1 or later.

Parameters

Name Type Description
first
str The first date.
second
str
The second date.

Result

The difference between the first and second date in seconds.

Samples


Output

To display the difference in seconds between now and a minute from now:

{{ date.DiffSeconds(date.now, date.AddMinutes(date.now, 1)) }} 

-60

To display the difference in seconds between now and 01/01/2000:

{{ date.DiffSeconds(date.now, "01/01/2000") }} 

322288425

Tag page (Edit tags)
    You must login to post a comment.