OpenWGA 7.10 - TMLScript reference

WGA » WGA.Date()
Method :

diff(otherDate, unit)

On object WGA.Date()
Usage

Calculates the difference between this date and another date and return the result based on the given unit.

Parameters

otherDate

Any other date object

unit (String):

Character determining the date unit to return:

"d"  - Days
"w" - Weeks
"h" - Hours
"m" - Minutes
"s" - Seconds

Return value

Number

Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Examples

WGA.Date("25.06.2020", "dd.MM.yyyy").diff(now(), "d")