Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362610

Summary: dateTimeLib.dateFromInt using 1899-12-31 rather than 1969-12-31
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-11-01 19:56:12 EDT
dateTimeLib.dateFromInt
This function should create a date using int as a number of days after a
starting point date: 1969-12-31.

Looks like the starting date for JavaScript is 1899-12-31.

See Bug 358495.

library dateFromInt
    myDate date;
    myString string;	
    function dateFromInt(){@Test}
        myDate = dateTimeLib.dateFromInt(25);
        myString = StringLib.format(myDate, "MM/dd/yyyy");
        LogResult.assertStringEqual("dateFromInt", "01/25/1970", myString);
    end	
end

dateFromInt - Failed: Expected value = '01/25/1970' Actual value = '01/25/1900'
Comment 1 broy2 CLA 2011-11-21 15:41:20 EST
Fixed in 20111121 build.
Comment 2 broy2 CLA 2011-11-21 15:41:32 EST
Verified.