Re: Calendar chooser problem



> CalendarChooser objFromDate = new CalendarChooser () ;
> CalendarChooser objToDate = new CalendarChooser () ;
> Date dtFrom = objFromDate.getDate () ;
> Date dtTo = objToDate.getDate () ;
> return dtFrom.compareTo ( dtTo ) ;
>
> The last line does not return 0 even if identical dates were selected.

Date does also include the time. So if you really only want to compare the
dates, then create new dates like:

Date dtFromDateOnly = new Date(dtFrom.getYear(), dtFrom.getMonth(),
dtFrom.getDate(), 0, 0, 0);

Or you might use similar functions from Calendar as most of the functions
above are deprecated.

Niels Dybdahl


.



Relevant Pages

  • Re: Moon Hoax people
    ... When that's how the calendar works it has to be that the 60's ran ... explaining everybody understanded it. ... Compare it with the fact we begin ... Prev by Date: ...
    (sci.space.history)
  • Re: Several pages of calendar need translation
    ... give me an interpretation so that I can compare with one I received ... hire a private eye to get the diary translated. ... those little heart marks on a calendar? ... how is Leon giving her a present for her 32 scribble scribble ...
    (sci.lang.japan)
  • Re: cardiac rehab
    ... She wants to command racial doctrines such as Alvin's calendar. ... relax in view of the evolutionary navels, ... Tomorrow, go compare a possession! ... Feyd alert so obnoxiously, ...
    (sci.bio.microbiology)
  • Re: Basic Set Up Question
    ... > consolidate, etc without merging? ... You can use the Compare Project versions add-in (see FAQ 36 - ... the subproject files and lets you see the subprojects all together. ... calendar. ...
    (microsoft.public.project)
  • OUTLOOK Calendar Time
    ... Try this, within her Outlook, go Tools, Options, Calendar ... You might compare that with other users. ... >as the correct time. ...
    (microsoft.public.outlook)