OpenWGA 7.0 - TMLScript reference
Object representing date and time information in TMLScript.
This date object describes a special point in time, but has no dependency to any special calendar/time system. Therefor it cannot be used directly to read or write special date fields like month, year, hour etc. which are specific to a special calendar system.
You can use the method WGA.parseDate() to parse a calendar specific string into a date object and the function WGA.format() to again get a human readable, calendar specific date/time representation from it or single fields of it.
The method WGA.createDate() can be used to create a date object containing the time that the object was created.
You can use the method WGA.createCalendar() and the created calendar object to read the date/time information from a date object and let it be interpreted as a georgian calendar date. Then you can read specific fields like month, year, hour etc. or even modify them.
|Allowed in script types||
|Properties and methods||
The following example creates a date object carrying the current time
and stores it as item on the users personalisation profile:
var currentTime = WGA.createDate();