OpenWGA 7.11 - TMLScript reference

WGA » WGA.Date()
Method :

dateOnly()

On object WGA.Date()
Usage

Removes all daytime information from a date and returns the resulting date as WGADate object for further method chaining.

Description

This method returns a new date which represents the date give but has hour, minute, second and millisecond information set to 0. So this date represents the day at second 0.

This method can be useful if you want to compare dates only on behalf of the day that they represent. Dates that are on the same day but with different daytimes will be equal when run through this method.

Return value

WGADate object

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").dateOnly()