init >>-init-------------------------------------------------------->< >>-init(fullDate--+---------+-)------------------------------->< +-,offset-+ >>-init(year,month,day-+---------+--------------------------------)---->< +-,offset-+ >>-init(year,month,day,hours,minutes,seconds--+--------------------------------+-)->< +-,-+--------------+-+---------+-+ +-microseconds-+ +-,offset-+ Initializes a new DateTime instance. If no arguments are specified, the DateTime instance is set to the current date and time. If the single [fullDate] argument is used, the DateTime argument is initialized to the date and time calculated by adding [fullDate] microseconds to 0001-01-01T00:00:00.000000. If the [year] , [month] , [day] , form is used, the DateTime instance is initialized to 00:00:00.000000 on the indicated date. Otherwise, the DateTime instance is initialized to the [year] , [month] , [day] , [hours] , [minutes] , [seconds] , and [microseconds] components. Each of these components must be a valid whole number within the acceptable range for the given component. For example, [year] must be in the range 1-9999, while [minutes] must be in the range 0-59. If specified, [offset] is the offset from UTC, in minutes. The [offset] must be valid whole number value. The default [offset] is the current system offset timezone offset. Class DATETIME today = .DateTime~new -- initializes to current date and time -- initializes to 9 Sep 2007 at 00:00:00.000000 day = .DateTime~new(date('F', "20070930", "S")) -- also initializes to 9 Sep 2007 at 00:00:00.000000 day = .DateTime~new(2007, 9, 30) -- initializes to 9 Sep 2007 at 10:33:00.000000 day = .DateTime~new(2007, 9, 30, 10, 33, 00) |