[android-developers] Re: Inconsistent results from date additions loop

2009-12-14 Thread andrew android
I seem to have resolved it b y replacing the call to the method after with a comparison. Thanks everyone! On Dec 12, 12:13 pm, andrew android andygoldm...@gmail.com wrote: the code is something like this... public void getWorkDays(final int mm,  final int dd,final int ccyy,                  

[android-developers] Re: Inconsistent results from date additions loop

2009-12-13 Thread andrew android
the code is something like this... public void getWorkDays(final int mm, final int dd,final int ccyy, final int mmNew, final int ddNew, final int ccyyNew) { Calendar c2 = Calendar.getInstance(); Calendar c4 = Calendar.getInstance();

[android-developers] Re: Inconsistent results from date additions loop

2009-12-13 Thread andrew android
Thanks for responding... the code is the following : public void getWorkDays(final int mm, final int dd,final int ccyy, final int mmNew, final int ddNew, final int ccyyNew) { Calendar c2 = Calendar.getInstance(); Calendar c4 =

[android-developers] Re: Inconsistent results from date additions loop

2009-12-07 Thread Dexter#39;s Brain
Doing it the millisecond way might be more confortable. Convert both the dates to milliseconds, and then subtract one from the other, and then calculate the no of days. Thanks Kumar Bibek http://tech-droid.blogspot.co On Dec 7, 4:52 am, andrew android andygoldm...@gmail.com wrote: I am running

[android-developers] Re: Inconsistent results from date additions loop

2009-12-07 Thread Streets Of Boston
You don't know how many milliseconds there are in a day, or even how many hours there are. Most days have 24 hours, one may have 23 and an other may have 25 hours ( DST ). And this depends whether your timezone has DST or not. The Calendar class should be able to figure all this out. However, if