Re: birthday dropdown with month/leap year variances

2008-10-27 Thread Piller Sébastien
Maybe you can just rely on Calendars, which provides 
Calendar#getMaximum(Calendar.DAY_OF_MONTH)


It is not really reinventing the wheel, just using the available api and 
combine



Steve Swinsburg a écrit :

Hi all,

I am creating a set of dropdown choices for a user to enter their 
birthday on a profile. One for day of the month, one for month of the 
year, and one for year. However I want to be able to take into account 
months that have differing numbers of days, (ie some 30, some 31, some 
28, every now and the 29 etc) which is all dependent on the month and 
if its a leap year or not.


Does anyone have a component/fragment of code that handles this 
already to save reinventing the wheel?




cheers,
Steve









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: birthday dropdown with month/leap year variances

2008-10-27 Thread Ryan Gravener
A simple way would be to use
http://wicketstuff.org/wicket13/dates/
with the settings used on
http://developer.yahoo.com/yui/examples/calendar/calnavigator.html

Ryan Gravener
http://ryangravener.com/flex | http://twitter.com/ryangravener


On Mon, Oct 27, 2008 at 12:08 PM, Steve Swinsburg 
[EMAIL PROTECTED] wrote:

 Hi all,

 I am creating a set of dropdown choices for a user to enter their birthday
 on a profile. One for day of the month, one for month of the year, and one
 for year. However I want to be able to take into account months that have
 differing numbers of days, (ie some 30, some 31, some 28, every now and the
 29 etc) which is all dependent on the month and if its a leap year or not.

 Does anyone have a component/fragment of code that handles this already to
 save reinventing the wheel?



 cheers,
 Steve