Thanks, I didn't realise that! That explain the results I'm getting. Best, Stephen
On Aug 19, 5:03 pm, Jack Ha <[email protected]> wrote: > The year specified in setYear() should be the year since 1900. That > said, it should be 109 (2009-1900) instead of 2009. > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > On Aug 18, 5:01 pm, Stephen Lebed <[email protected]> wrote: > > > How would I compare the current date against a date I've set to > > determine if today is before or after the set date? > > > I've tried the following, but its not working > > > Date endTime; > > { > > endTime = new Date(); > > endTime.setMonth(11); > > endTime.setYear(2009); > > > } > > > Date trialTime; > > { > > trialTime = new Date(); > > trialTime.getMonth(); > > trialTime.getYear(); > > > } > > > boolean test = endTime.before(trialTime); > > > Any help is greatly appreciated. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

