I understand the isEquals() method compares the chronology but the why does
the LocalDate class equals method compare the chronology and why does it
even care?

In my mind, a LocalDate class should not care what sort of chronology it
was constructed with. If the year, month, and date match, it should be
equals. Is there a flaw in that logic?

On Wed, Jun 27, 2012 at 10:54 AM, Matthew McCawley <
mmccaw...@automatedlogic.com> wrote:

> John Hanks <jhanks9...@gmail.com> wrote on 06/27/2012 01:26:43 PM:
>
> > In my previous example the output of getChronology() is shown below:
>
> >
> > localDate1  -> GJChronology[UTC]
> > localDate2  -> ISOChronology[UTC]
> >
> > That begs the question, why does the LocalDate class even care about
> > the chronology?
>
> Equals: "Compares this ReadablePartial with another returning true if the
> chronology, field types and values are equal."
> *
> http://joda-time.sourceforge.net/apidocs/org/joda/time/LocalDate.html#equals(java.lang.Object)
> *<http://joda-time.sourceforge.net/apidocs/org/joda/time/LocalDate.html#equals(java.lang.Object)>
>
>
> isEqual: "Is this partial the same as the specified partial."
> *
> http://joda-time.sourceforge.net/apidocs/org/joda/time/base/AbstractPartial.html#isEqual(org.joda.time.ReadablePartial)
> *<http://joda-time.sourceforge.net/apidocs/org/joda/time/base/AbstractPartial.html#isEqual(org.joda.time.ReadablePartial)>
>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to