OpenWGA 7.11 - TMLScript reference

WGA » WGA.Date()
Method :

modify(unit, amount)

On object WGA.Date()

Modifies the date and returns the resulting date as WGADate object for further method chaining.


Modifies a date by adding/substracting a certain timespan


unit (String):

Character determining the date unit to add:

"d" or "D" - Day
"M" - Month
"w" or "W" - Week
"y" - Year
"H" or "h" - Hour
"m" - Minute
"s" - Second
"S" - Millisecond

amount (Number):

Amount of date units to add to the date. Negative amounts effectively substract the unit.

Return value

WGADate object

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

WGA.Date("25.06.2020", "dd.MM.yyyy").modify("d", 10)