12.07.2015 Views

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Date constructorThe date constructor has four distinct forms.Date constructorSyntaxnew Date()EffectReturns the date representing the current time.new Date(milliseconds) Returns the date representing 00:00:00 UTC, January 1, 1970, plusmilliseconds milliseconds.The argument can be negative, to express a datebefore 1970. If the argument cannot be converted to a number, the thirdconstructor syntax is used.Examples:new Date(0) -> a date representing 00:00:00 UTC, January 1, 1970.new Date(1000*60*60*24*20) -> a date representing twenty days after00:00:00 UTC, January 1, 1970.new Date(-1000*60*60*24*20) -> a date representing twenty days before00:00:00 UTC, January 1, 1970.new Date(string)Returns the date described by string, which must have the form:month/day/year hour:minute:second msecondThe date expressed in string is taken in local time.Example:new Date("12/25/1932 14:35:12 820")A date representing December 25th, 1932, at 2:35 PM plus 12 seconds and820 milliseconds, local time.new Date(year,month,[ , day[ , hours[ , minutes[ , seconds[ , mseconds ]]]]])Returns a new date representing the given year, month, day, and so on, takenin local time. The arguments are:year: any integer.month: range 0-11 (where 0=January, 1=February, and so on)day: range 1-31, default 1hours: range 0-23, default 0minutes: range 0-59, default 0seconds: range 0-59, default 0mseconds: range 0-999, defaults to 0.Examples:new Date(1932, 11, 25, 14, 35, 12, 820)I L O G O P L D E V E L O P M E N T S T U D I O L A N G U A G ER E F E R E N C E M A N U A L253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!