• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calendar roll() method

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently downloaded a Date Picker control that has the strange behavior of going from Dec. 2003 (for example) to Jan. 2003 when I choose the 'next month' button ('>'). Researching the problem I discovered that this occurs because the author chose to use the Calendar roll() method, rather than the add() method. Studying the Javadocs for roll() I can't help but wonder what is the value of this method? Why would anyone ever want to use roll()?
It appears to me that this method might occasionally give the correct values, but would very often give incorrect results. So, can anyone explain to me when they would truly want to use the roll() method?
TIA,
Dave Derry
 
reply
    Bookmark Topic Watch Topic
  • New Topic