OpenWGA 7.11 - TMLScript reference

Method :


On object WGA
Usage Removes all daytime information from a date

DEPRECATED since 7.10.1. Use WGA.Date().dateOnly() instead.


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.


date (Date):

The date object

Return value Date object with resetted daytime information
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events

Comparing dates only for their day information:

if (WGA.dateOnly(date1) == WGA.dateOnly(date2)) {

  return true;


else {

  return false;