On 01.11.2012 14:16, Edwin Shin wrote: >> - I think i also fixed a bug in the test were XSD dates were used by tests >> for parsing >> Dates, but since these use 0000 as the year 1 BCE and joda time uses >> -0001 i had to change these. >> Please check that i did it correctly > I haven't had a chance to go over your changes, but here's the significant > bit I remember around XSD dateTime handling when I wrote this part of the > class & corresponding test: > > "0000" is the lexical representation of 1 BCE > "-0001" is the lexical representation of 2 BCE > > per the second edition of definition of XSD dateTimes "3.2.7.2 Canonical > representation"
The problem is that the parser in TestDateUtility.java:105 reads Dates from their XSD representation where "0000 is 1 BCE" while I thought it should test the *non* XSD representations so rather a assertEquals(ONE_BCE, DateUtility.parseDateLoose(ONE_BCE_DT)); than a assertEquals(ONE_BCE, DateUtility.parseDateLoose(ONE_BCE_XSD_DT)); But im not so sure about this now :) And I did a check just now and saw that there are incompabilities in between Joda's Parser and SimpleDateFormat since when you run this main method you can see that you cannot parse Java Dates using Joda: https://gist.github.com/4016278 Therefore FCREPO-1161 will need some more work, since I will have to double check everything, and it's probably not ripe for 3.6.2 -- *frank asseg* softwareentwicklung feichtmayrstrasse 37 76646 bruchsal tel: ++49-7251-322-6075 fax: ++49-7251-322-6078 http://www.objecthunter.net/ ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ Fedora-commons-developers mailing list Fedora-commons-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers