| Summary: | StringLib.format(myDate with different patterns returns null | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | broy2 |
| Component: | EDT | Assignee: | Project Inbox <edt.javascriptgen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Fixed in 20111121 build. Verified. |
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.