On 20 November 2012 21:53, Thorvald Natvig <thorv...@medallia.com> wrote: > Due to a really wrong date ending up in our system, I found a small > discrepancy in LocalDate.fromCalendarFields. > > calendar.get(Calendar.YEAR) will return +3 for both 3 AD and 3 BC, which > means they are both treated equally by fromCalendarFields. > > I added a local workaround, which was simply: > > return new LocalDate( > calendar.get(Calendar.YEAR) * > (calendar.get(Calendar.ERA) == GregorianCalendar.AD ? 1 : -1), > calendar.get(Calendar.MONTH) + 1, > calendar.get(Calendar.DAY_OF_MONTH)); > > .. which seems to have fixed the problem for me. > > Any chance of this being fixed in the next release?
Bad coding on my part. Sorry. A GitHub pull request would pretty much guarantee it being in the next release. thanks Stephen ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Joda-interest mailing list Joda-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/joda-interest