threeten-develop — Development list

You can subscribe to this list here.

 2010 2011 2012 2013 2014 2015 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec (1) Jan (15) Feb Mar (22) Apr (4) May (2) Jun (6) Jul (14) Aug Sep (18) Oct (64) Nov (10) Dec (22) Jan (18) Feb (43) Mar (43) Apr (38) May (98) Jun (71) Jul (47) Aug (33) Sep (45) Oct (77) Nov (32) Dec (251) Jan (112) Feb (76) Mar (41) Apr (18) May Jun Jul Aug Sep Oct (2) Nov Dec (7) Jan (15) Feb Mar (2) Apr May Jun Jul Aug Sep Oct (8) Nov (5) Dec Jan (2) Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
S M T W T F S

1

2

3

4
(2)
5
(9)
6
(9)
7

8

9

10
(6)
11
(1)
12
(1)
13

14
(1)
15
(2)
16

17
(2)
18

19

20
(2)
21

22

23
(1)
24

25
(2)
26
(3)
27
(1)
28

29

30
(3)

Showing 9 results of 9

 Re: [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Douglas Surber - 2012-09-06 22:55:14 ```The negated one is what Roger asked about. The two checks are not necessarily equivalent without some premises on the behavior of negated. I'd say my question is the simplest definition of negated, so no they aren't equivalent. Douglas At 03:33 PM 9/6/2012, Stephen Colebourne wrote: >Quick answer, I don't know without looking at lots of examples. I >don't immediately think that the negated check is as important as >the >one I posted, but I also suspect that the two checks may in fact be >equivalent. >Stephen > >On 6 September 2012 23:30, Douglas Surber > wrote: > > Is it required that > > > > ISOPeriod.between(start, end).equals(ISOPeriod.between(end, > > start).negated()) > > > > Douglas > > > > > > At 03:09 PM 9/6/2012, Stephen Colebourne wrote: > >>The following is required to be true (pseudo code): > >> > >>LocalDate start > >>LocalDate end > >> > >>ISOPeriod period = ISOPeriod.between(start, end); > >>LocalDate sum = start.plus(period) > >>assert sum == end > >> > >>AFAIK, this should apply whether or not start is before or after > >>end. > >>Stephen > >> > >> > >>On 6 September 2012 22:18, Roger Riggs > >>wrote: > >> > It is likely related to different number of days in the > starting > >> and ending > >> > months. > >> > Its bug, because for the earlier month it should be counting > the > >> days left > >> > in the month > >> > and for the later month it should be counting days since the > >> start of the > >> > the month. > >> > The current code computes it using the start and ending > >> arguments, not the > >> > earlier/later date. > >> > > >> > I'll fix it. > >> > > >> > > >> > ld1: 2010-03-30 > >> > ld2: 2011-05-01 > >> > diff12: P1Y1M1D > >> > diff21: P-1Y-1M-2D > >> > negated diff21: P1Y1M2D > >> > > >> > @Test() > >> > public void test_between() { > >> > LocalDate ld1 = LocalDate.of(2010, 3, 30); > >> > LocalDate ld2 = LocalDate.of(2011, 5, 1); > >> > LocalPeriod diff12 = LocalPeriod.between(ld1, ld2); > >> > LocalPeriod diff21 = LocalPeriod.between(ld2, ld1); > >> > System.out.printf("ld1: %s%nld2: %s%ndiff12: > %s%ndiff21: > >> %s%nnegated > >> > diff21: %s%n%n", ld1, ld2, diff12, diff21, diff21.negated()); > >> > > >> > } > >> > > >> > > >> > On 09/06/2012 04:34 PM, Douglas Surber wrote: > >> > > >> > Let me be sure I understand. You are saying that > >> > > >> > LocalDate ld1 = ... ; > >> > LocalDate ld2 = ... ; > >> > Period p1 = ld1.difference(ld2); > >> > Period p2 = ld2.difference(ld1); > >> > System.out.println( ld1.equals(ld2.negated()) ); > >> > > >> > may print false. Correct? If so can you explain the > >> circumstances? > >> > > >> > Douglas > >> > > >> > > >> > At 01:20 PM 9/6/2012, Roger Riggs wrote: > >> > > >> > In the implementation of multi-unit periods it comes to light > >> that in some > >> > cases between(start, end) is not equal to between(end, > >> start).negated(). > >> > > >> > A developer might reasonably expect that the number of months > and > >> days > >> > between two dates is the same (except for the sign) of two > dates. > >> > > >> > This seems to be a bug. > >> > If it is a feature, it will need to be explained and may still > be > >> a cause of > >> > bugs. > >> > -- > >> > Thanks, Roger > >> > > >> > Oracle Java Platform Group > >> > > >> > Green Oracle ; Oracle is > >> committed to > >> > developing practices and products that help protect the > >> environment > >> > > >> > > >> > In the implementation of multi-unit periods it comes to light > >> that in some > >> > cases between(start, end) is not equal to between(end, > >> start).negated(). > >> > > >> > A developer might reasonably expect that the number of months > and > >> days > >> > between two dates is the same (except for the sign) of two > dates. > >> > > >> > This seems to be a bug. > >> > If it is a feature, it will need to be explained and may still > be > >> a cause of > >> > bugs. > >> > -- > >> > Thanks, Roger > >> > > >> > Oracle Java Platform Group > >> > > >> > ; > >> > Green > >> > Oracle is committed to developing practices and products that > >> help protect > >> > the environment > >> > > >> > ------------------------------------------------------------------------------ > >> > 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/ > >> > > >> > _______________________________________________ > >> > threeten-develop mailing list > >> > threeten-develop@... > >> > https://lists.sourceforge.net/lists/listinfo/threeten-develop > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > 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/ > >> > > >> > _______________________________________________ > >> > threeten-develop mailing list > >> > threeten-develop@... > >> > https://lists.sourceforge.net/lists/listinfo/threeten-develop > >> > > >> > > >> > > >> > > >> > ------------------------------------------------------------------------------ > >> > 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/ > >> > _______________________________________________ > >> > threeten-develop mailing list > >> > threeten-develop@... > >> > https://lists.sourceforge.net/lists/listinfo/threeten-develop > >> > > >> > >>------------------------------------------------------------------ > ------------ > >>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/ > >>_______________________________________________ > >>threeten-develop mailing list > >>threeten-develop@... > >>https://lists.sourceforge.net/lists/listinfo/threeten-develop > > > > > > > ------------------------------------------------------------------------------ > > 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/ > > _______________________________________________ > > threeten-develop mailing list > > threeten-develop@... > > https://lists.sourceforge.net/lists/listinfo/threeten-develop > >------------------------------------------------------------------------------ >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/ >_______________________________________________ >threeten-develop mailing list >threeten-develop@... >https://lists.sourceforge.net/lists/listinfo/threeten-develop ```
 Re: [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Stephen Colebourne - 2012-09-06 22:33:40 ```Quick answer, I don't know without looking at lots of examples. I don't immediately think that the negated check is as important as the one I posted, but I also suspect that the two checks may in fact be equivalent. Stephen On 6 September 2012 23:30, Douglas Surber wrote: > Is it required that > > ISOPeriod.between(start, end).equals(ISOPeriod.between(end, > start).negated()) > > Douglas > > > At 03:09 PM 9/6/2012, Stephen Colebourne wrote: >>The following is required to be true (pseudo code): >> >>LocalDate start >>LocalDate end >> >>ISOPeriod period = ISOPeriod.between(start, end); >>LocalDate sum = start.plus(period) >>assert sum == end >> >>AFAIK, this should apply whether or not start is before or after >>end. >>Stephen >> >> >>On 6 September 2012 22:18, Roger Riggs >>wrote: >> > It is likely related to different number of days in the starting >> and ending >> > months. >> > Its bug, because for the earlier month it should be counting the >> days left >> > in the month >> > and for the later month it should be counting days since the >> start of the >> > the month. >> > The current code computes it using the start and ending >> arguments, not the >> > earlier/later date. >> > >> > I'll fix it. >> > >> > >> > ld1: 2010-03-30 >> > ld2: 2011-05-01 >> > diff12: P1Y1M1D >> > diff21: P-1Y-1M-2D >> > negated diff21: P1Y1M2D >> > >> > @Test() >> > public void test_between() { >> > LocalDate ld1 = LocalDate.of(2010, 3, 30); >> > LocalDate ld2 = LocalDate.of(2011, 5, 1); >> > LocalPeriod diff12 = LocalPeriod.between(ld1, ld2); >> > LocalPeriod diff21 = LocalPeriod.between(ld2, ld1); >> > System.out.printf("ld1: %s%nld2: %s%ndiff12: %s%ndiff21: >> %s%nnegated >> > diff21: %s%n%n", ld1, ld2, diff12, diff21, diff21.negated()); >> > >> > } >> > >> > >> > On 09/06/2012 04:34 PM, Douglas Surber wrote: >> > >> > Let me be sure I understand. You are saying that >> > >> > LocalDate ld1 = ... ; >> > LocalDate ld2 = ... ; >> > Period p1 = ld1.difference(ld2); >> > Period p2 = ld2.difference(ld1); >> > System.out.println( ld1.equals(ld2.negated()) ); >> > >> > may print false. Correct? If so can you explain the >> circumstances? >> > >> > Douglas >> > >> > >> > At 01:20 PM 9/6/2012, Roger Riggs wrote: >> > >> > In the implementation of multi-unit periods it comes to light >> that in some >> > cases between(start, end) is not equal to between(end, >> start).negated(). >> > >> > A developer might reasonably expect that the number of months and >> days >> > between two dates is the same (except for the sign) of two dates. >> > >> > This seems to be a bug. >> > If it is a feature, it will need to be explained and may still be >> a cause of >> > bugs. >> > -- >> > Thanks, Roger >> > >> > Oracle Java Platform Group >> > >> > Green Oracle ; Oracle is >> committed to >> > developing practices and products that help protect the >> environment >> > >> > >> > In the implementation of multi-unit periods it comes to light >> that in some >> > cases between(start, end) is not equal to between(end, >> start).negated(). >> > >> > A developer might reasonably expect that the number of months and >> days >> > between two dates is the same (except for the sign) of two dates. >> > >> > This seems to be a bug. >> > If it is a feature, it will need to be explained and may still be >> a cause of >> > bugs. >> > -- >> > Thanks, Roger >> > >> > Oracle Java Platform Group >> > >> > ; >> > Green >> > Oracle is committed to developing practices and products that >> help protect >> > the environment >> > >> ------------------------------------------------------------------------------ >> > 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/ >> > >> > _______________________________________________ >> > threeten-develop mailing list >> > threeten-develop@... >> > https://lists.sourceforge.net/lists/listinfo/threeten-develop >> > >> > >> ------------------------------------------------------------------------------ >> > 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/ >> > >> > _______________________________________________ >> > threeten-develop mailing list >> > threeten-develop@... >> > https://lists.sourceforge.net/lists/listinfo/threeten-develop >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > 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/ >> > _______________________________________________ >> > threeten-develop mailing list >> > threeten-develop@... >> > https://lists.sourceforge.net/lists/listinfo/threeten-develop >> > >> >>------------------------------------------------------------------------------ >>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/ >>_______________________________________________ >>threeten-develop mailing list >>threeten-develop@... >>https://lists.sourceforge.net/lists/listinfo/threeten-develop > > > ------------------------------------------------------------------------------ > 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/ > _______________________________________________ > threeten-develop mailing list > threeten-develop@... > https://lists.sourceforge.net/lists/listinfo/threeten-develop ```
 Re: [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Douglas Surber - 2012-09-06 22:30:46 ```Is it required that ISOPeriod.between(start, end).equals(ISOPeriod.between(end, start).negated()) Douglas At 03:09 PM 9/6/2012, Stephen Colebourne wrote: >The following is required to be true (pseudo code): > >LocalDate start >LocalDate end > >ISOPeriod period = ISOPeriod.between(start, end); >LocalDate sum = start.plus(period) >assert sum == end > >AFAIK, this should apply whether or not start is before or after >end. >Stephen > > >On 6 September 2012 22:18, Roger Riggs >wrote: > > It is likely related to different number of days in the starting > and ending > > months. > > Its bug, because for the earlier month it should be counting the > days left > > in the month > > and for the later month it should be counting days since the > start of the > > the month. > > The current code computes it using the start and ending > arguments, not the > > earlier/later date. > > > > I'll fix it. > > > > > > ld1: 2010-03-30 > > ld2: 2011-05-01 > > diff12: P1Y1M1D > > diff21: P-1Y-1M-2D > > negated diff21: P1Y1M2D > > > > @Test() > > public void test_between() { > > LocalDate ld1 = LocalDate.of(2010, 3, 30); > > LocalDate ld2 = LocalDate.of(2011, 5, 1); > > LocalPeriod diff12 = LocalPeriod.between(ld1, ld2); > > LocalPeriod diff21 = LocalPeriod.between(ld2, ld1); > > System.out.printf("ld1: %s%nld2: %s%ndiff12: %s%ndiff21: > %s%nnegated > > diff21: %s%n%n", ld1, ld2, diff12, diff21, diff21.negated()); > > > > } > > > > > > On 09/06/2012 04:34 PM, Douglas Surber wrote: > > > > Let me be sure I understand. You are saying that > > > > LocalDate ld1 = ... ; > > LocalDate ld2 = ... ; > > Period p1 = ld1.difference(ld2); > > Period p2 = ld2.difference(ld1); > > System.out.println( ld1.equals(ld2.negated()) ); > > > > may print false. Correct? If so can you explain the > circumstances? > > > > Douglas > > > > > > At 01:20 PM 9/6/2012, Roger Riggs wrote: > > > > In the implementation of multi-unit periods it comes to light > that in some > > cases between(start, end) is not equal to between(end, > start).negated(). > > > > A developer might reasonably expect that the number of months and > days > > between two dates is the same (except for the sign) of two dates. > > > > This seems to be a bug. > > If it is a feature, it will need to be explained and may still be > a cause of > > bugs. > > -- > > Thanks, Roger > > > > Oracle Java Platform Group > > > > Green Oracle ; Oracle is > committed to > > developing practices and products that help protect the > environment > > > > > > In the implementation of multi-unit periods it comes to light > that in some > > cases between(start, end) is not equal to between(end, > start).negated(). > > > > A developer might reasonably expect that the number of months and > days > > between two dates is the same (except for the sign) of two dates. > > > > This seems to be a bug. > > If it is a feature, it will need to be explained and may still be > a cause of > > bugs. > > -- > > Thanks, Roger > > > > Oracle Java Platform Group > > > > ; > > Green > > Oracle is committed to developing practices and products that > help protect > > the environment > > > ------------------------------------------------------------------------------ > > 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/ > > > > _______________________________________________ > > threeten-develop mailing list > > threeten-develop@... > > https://lists.sourceforge.net/lists/listinfo/threeten-develop > > > > > ------------------------------------------------------------------------------ > > 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/ > > > > _______________________________________________ > > threeten-develop mailing list > > threeten-develop@... > > https://lists.sourceforge.net/lists/listinfo/threeten-develop > > > > > > > > > ------------------------------------------------------------------------------ > > 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/ > > _______________________________________________ > > threeten-develop mailing list > > threeten-develop@... > > https://lists.sourceforge.net/lists/listinfo/threeten-develop > > > >------------------------------------------------------------------------------ >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/ >_______________________________________________ >threeten-develop mailing list >threeten-develop@... >https://lists.sourceforge.net/lists/listinfo/threeten-develop ```
 Re: [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Stephen Colebourne - 2012-09-06 22:09:59 ```The following is required to be true (pseudo code): LocalDate start LocalDate end ISOPeriod period = ISOPeriod.between(start, end); LocalDate sum = start.plus(period) assert sum == end AFAIK, this should apply whether or not start is before or after end. Stephen On 6 September 2012 22:18, Roger Riggs wrote: > It is likely related to different number of days in the starting and ending > months. > Its bug, because for the earlier month it should be counting the days left > in the month > and for the later month it should be counting days since the start of the > the month. > The current code computes it using the start and ending arguments, not the > earlier/later date. > > I'll fix it. > > > ld1: 2010-03-30 > ld2: 2011-05-01 > diff12: P1Y1M1D > diff21: P-1Y-1M-2D > negated diff21: P1Y1M2D > > @Test() > public void test_between() { > LocalDate ld1 = LocalDate.of(2010, 3, 30); > LocalDate ld2 = LocalDate.of(2011, 5, 1); > LocalPeriod diff12 = LocalPeriod.between(ld1, ld2); > LocalPeriod diff21 = LocalPeriod.between(ld2, ld1); > System.out.printf("ld1: %s%nld2: %s%ndiff12: %s%ndiff21: %s%nnegated > diff21: %s%n%n", ld1, ld2, diff12, diff21, diff21.negated()); > > } > > > On 09/06/2012 04:34 PM, Douglas Surber wrote: > > Let me be sure I understand. You are saying that > > LocalDate ld1 = ... ; > LocalDate ld2 = ... ; > Period p1 = ld1.difference(ld2); > Period p2 = ld2.difference(ld1); > System.out.println( ld1.equals(ld2.negated()) ); > > may print false. Correct? If so can you explain the circumstances? > > Douglas > > > At 01:20 PM 9/6/2012, Roger Riggs wrote: > > In the implementation of multi-unit periods it comes to light that in some > cases between(start, end) is not equal to between(end, start).negated(). > > A developer might reasonably expect that the number of months and days > between two dates is the same (except for the sign) of two dates. > > This seems to be a bug. > If it is a feature, it will need to be explained and may still be a cause of > bugs. > -- > Thanks, Roger > > Oracle Java Platform Group > > Green Oracle ; Oracle is committed to > developing practices and products that help protect the environment > > > In the implementation of multi-unit periods it comes to light that in some > cases between(start, end) is not equal to between(end, start).negated(). > > A developer might reasonably expect that the number of months and days > between two dates is the same (except for the sign) of two dates. > > This seems to be a bug. > If it is a feature, it will need to be explained and may still be a cause of > bugs. > -- > Thanks, Roger > > Oracle Java Platform Group > > ; > Green > Oracle is committed to developing practices and products that help protect > the environment > ------------------------------------------------------------------------------ > 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/ > > _______________________________________________ > threeten-develop mailing list > threeten-develop@... > https://lists.sourceforge.net/lists/listinfo/threeten-develop > > ------------------------------------------------------------------------------ > 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/ > > _______________________________________________ > threeten-develop mailing list > threeten-develop@... > https://lists.sourceforge.net/lists/listinfo/threeten-develop > > > > ------------------------------------------------------------------------------ > 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/ > _______________________________________________ > threeten-develop mailing list > threeten-develop@... > https://lists.sourceforge.net/lists/listinfo/threeten-develop > ```
 Re: [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Roger Riggs - 2012-09-06 21:17:26 Attachments: Message as HTML ```It is likely related to different number of days in the starting and ending months. Its bug, because for the earlier month it should be counting the days left in the month and for the later month it should be counting days since the start of the the month. The current code computes it using the start and ending arguments, not the earlier/later date. I'll fix it. ld1: 2010-03-30 ld2: 2011-05-01 diff12: P1Y1M1D diff21: P-1Y-1M-2D negated diff21: P1Y1M2D @Test() public void test_between() { LocalDate ld1 = LocalDate.of(2010, 3, 30); LocalDate ld2 = LocalDate.of(2011, 5, 1); LocalPeriod diff12 = LocalPeriod.between(ld1, ld2); LocalPeriod diff21 = LocalPeriod.between(ld2, ld1); System.out.printf("ld1: %s%nld2: %s%ndiff12: %s%ndiff21: %s%nnegated diff21: %s%n%n", ld1, ld2, diff12, diff21, diff21.negated()); } On 09/06/2012 04:34 PM, Douglas Surber wrote: > Let me be sure I understand. You are saying that > > LocalDate ld1 = ... ; > LocalDate ld2 = ... ; > Period p1 = ld1.difference(ld2); > Period p2 = ld2.difference(ld1); > System.out.println( ld1.equals(ld2.negated()) ); > > may print false. Correct? If so can you explain the circumstances? > > Douglas > > > At 01:20 PM 9/6/2012, Roger Riggs wrote: >> In the implementation of multi-unit periods it comes to light that in >> some >> cases between(start, end) is not equal to between(end, start).negated(). >> >> A developer might reasonably expect that the number of months and days >> between two dates is the same (except for the sign) of two dates. >> >> This seems to be a bug. >> If it is a feature, it will need to be explained and may still be a >> cause of bugs. >> -- >> Thanks, Roger >> >> Oracle Java Platform Group >> >> Green Oracle ; Oracle is committed >> to developing practices and products that help protect the environment >> >> >> In the implementation of multi-unit periods it comes to light that in >> some >> cases between(start, end) is not equal to between(end, start).negated(). >> >> A developer might reasonably expect that the number of months and days >> between two dates is the same (except for the sign) of two dates. >> >> This seems to be a bug. >> If it is a feature, it will need to be explained and may still be a >> cause of bugs. >> -- >> Thanks, Roger >> >> Oracle Java Platform Group >> >> ; >> Green >> Oracle is committed to developing practices and products that help >> protect the environment >> ------------------------------------------------------------------------------ >> >> 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/ >> >> _______________________________________________ >> threeten-develop mailing list >> threeten-develop@... >> https://lists.sourceforge.net/lists/listinfo/threeten-develop > > > ------------------------------------------------------------------------------ > 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/ > > > _______________________________________________ > threeten-develop mailing list > threeten-develop@... > https://lists.sourceforge.net/lists/listinfo/threeten-develop ```
 Re: [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Douglas Surber - 2012-09-06 20:43:01 ```Correction below. At 01:34 PM 9/6/2012, Douglas Surber wrote: >Let me be sure I understand. You are saying that > > LocalDate ld1 = ... ; > LocalDate ld2 = ... ; > Period p1 = ld1.difference(ld2); > Period p2 = ld2.difference(ld1); > System.out.println( ld1.equals(ld2.negated()) ); System.out.println( p1.equals(p2.negated()) ); >may print false. Correct? If so can you explain the circumstances? > >Douglas > > >At 01:20 PM 9/6/2012, Roger Riggs wrote: >>In the implementation of multi-unit periods it comes to light that >>in some >>cases between(start, end) is not equal to between(end, >>start).negated(). >> >>A developer might reasonably expect that the number of months and >>days >>between two dates is the same (except for the sign) of two dates. >> >>This seems to be a bug. >>If it is a feature, it will need to be explained and may still be a >>cause of bugs. >>-- >>Thanks, Roger >> >>Oracle Java Platform Group >> >>Green Oracle ; Oracle is committed >>to developing practices and products that help protect the >>environment >> >> >>In the implementation of multi-unit periods it comes to light that >>in some >>cases between(start, end) is not equal to between(end, >>start).negated(). >> >>A developer might reasonably expect that the number of months and >>days >>between two dates is the same (except for the sign) of two dates. >> >>This seems to be a bug. >>If it is a feature, it will need to be explained and may still be a >>cause of bugs. >>-- >>Thanks, Roger >> >>Oracle Java Platform Group >> >>; >>Green >> Oracle is committed to developing practices and products that >> help protect the environment >>------------------------------------------------------------------------------ >>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/ >> >>_______________________________________________ >>threeten-develop mailing list >>threeten-develop@... >>https://lists.sourceforge.net/lists/listinfo/threeten-develop > > >------------------------------------------------------------------------------ >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/ > >_______________________________________________ >threeten-develop mailing list >threeten-develop@... >https://lists.sourceforge.net/lists/listinfo/threeten-develop ```
 Re: [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Douglas Surber - 2012-09-06 20:34:23 Attachments: 5c49674f.jpg ```Let me be sure I understand. You are saying that LocalDate ld1 = ... ; LocalDate ld2 = ... ; Period p1 = ld1.difference(ld2); Period p2 = ld2.difference(ld1); System.out.println( ld1.equals(ld2.negated()) ); may print false. Correct? If so can you explain the circumstances? Douglas At 01:20 PM 9/6/2012, Roger Riggs wrote: >In the implementation of multi-unit periods it comes to light that >in some >cases between(start, end) is not equal to between(end, >start).negated(). > >A developer might reasonably expect that the number of months and >days >between two dates is the same (except for the sign) of two dates. > >This seems to be a bug. >If it is a feature, it will need to be explained and may still be a >cause of bugs. >-- >Thanks, Roger > >Oracle Java Platform Group > >Green Oracle ; Oracle is committed >to developing practices and products that help protect the >environment > > >In the implementation of multi-unit periods it comes to light that >in some >cases between(start, end) is not equal to between(end, >start).negated(). > >A developer might reasonably expect that the number of months and >days >between two dates is the same (except for the sign) of two dates. > >This seems to be a bug. >If it is a feature, it will need to be explained and may still be a >cause of bugs. >-- >Thanks, Roger > >Oracle Java Platform Group > >; >Green > Oracle is committed to developing practices and products that help > protect the environment >------------------------------------------------------------------------------ >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/ > >_______________________________________________ >threeten-develop mailing list >threeten-develop@... >https://lists.sourceforge.net/lists/listinfo/threeten-develop ```
 [threeten-develop] LocalPeriod/LocalDate arithmetic properties From: Roger Riggs - 2012-09-06 20:21:00 Attachments: text/plain ```In the implementation of multi-unit periods it comes to light that in some cases between(start, end) is not equal to between(end, start).negated(). A developer might reasonably expect that the number of months and days between two dates is the same (except for the sign) of two dates. This seems to be a bug. If it is a feature, it will need to be explained and may still be a cause of bugs. -- Thanks, Roger Oracle Java Platform Group Green Oracle ; Oracle is committed to developing practices and products that help protect the environment ```
 [threeten-develop] Extra Fields Branch (ok) From: Roger Riggs - 2012-09-06 01:57:17 Attachments: Message as HTML ```Thanks for the chance to review. The use of INSTANT_SECONDS is an improvement as is OFFSET_SECONDS. ```

Showing 9 results of 9