date() (formats)
Usage
-- Lingo syntax syntax
date({stringFormat})
date({intFormat})
date({intYearFormat, intMonthFormat, intDayFormat})
// JavaScript syntax
Date({"month dd, yyyy hh:mm:ss"});
Date({"month dd, yyyy"});
Date({yy,mm,dd,hh,mm,ss});
Date({yy,mm,dd});
Date({milliseconds});
Description
Top level function and data type. Creates a standard, formatted date object instance for use with
other date object instances in arithmetic operations and for use in manipulating dates across
platforms and in international formats.
Lingo date objects and JavaScript syntax date objects are different; therefore, Lingo date objects
cannot be created using JavaScript syntax, and JavaScript syntax date objects cannot be created
using Lingo syntax.
Create a new JavaScript syntax Date object using the
JavaScript syntax. For example, using
When creating a date using Lingo, use four digits for the year, two digits for the month,
and two digits for the day. The following expressions all return a date object equivalent to
October 21, 2004.
Date Format
string
integer
comma separated
The individual properties of the returned date object are as follows.
Property
#year
#month
#day
Addition and subtraction operations on the date are interpreted as the addition and subtraction of
days.
Parameters
Optional when creating a Lingo date object. A string that specifies the new
stringFormat
date object.
282
Chapter 12: Methods
new date()
Usage
date("20041021")
date(20041021)
date(2004, 10, 21)
Description
An integer representing the year
An integer representing the month of the year
An integer representing the day of the month
syntax. Case is important in
new Date()
results in a runtime error.
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers