@Today (JavaScript)

Returns today's date.

Defined in

@Functions (JavaScript)

Syntax

@Today() : Date
Return value Description
Date Today's date.

Usage

This function provides only a date. The time is set to 0 hours.

Examples

This example constructs a date and time by using the date from @Today and specifying the time literally.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var date1 = @Today();
var year = @Year(date1);
var month = @Month(date1);
var day = @Day(date1);
var today = @Date(year, month, day, 13, 30, 0);
p("Today at 1:30PM = " + today.toLocaleString());