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

Bug 363356

Summary: StringLib.format(myDate with different patterns returns null
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-09 12:03:30 EST
Use EUNIT to run:

library formatDate
	result string;
	myDate date = "04/07/2015";
    function formatDate2(){@Test}
        result = StringLib.format(myDate, "EEE, MMM, d, ''yy");  
        LogResult.assertStringEqual("formatDate2", "Tue, Apr, 7, '15", result);
    end
    function formatDate3(){@Test}
        result = StringLib.format(myDate, "yyyyy.MMMMM.dd GGG");	
        LogResult.assertStringEqual("formatDate3", "02015.April.07 AD",
                result);
    end
    function formatDate4(){@Test}
        result = StringLib.format(myDate, "yyyy.MM.dd G");					
        LogResult.assertStringEqual("formatDate3", "2015.04.07 AD", result);
    end	
end

All fail.

formatDate::formatDate2: FAILED - formatDate2 - Failed: Expected value = 'Tue, Apr, 7, '15' Actual value = 'null' 
formatDate::formatDate3: FAILED - formatDate3 - Failed: Expected value = '02015.April.07 AD' Actual value = 'null' 
formatDate::formatDate4: FAILED - formatDate3 - Failed: Expected value = '2015.04.07 AD' Actual value = 'null' 

Pattern "MM/dd/yyyy" works OK.
Comment 1 broy2 CLA 2011-11-21 16:04:31 EST
Fixed in 20111121 build.
Comment 2 broy2 CLA 2011-11-21 16:04:42 EST
Verified.