As John Hardy said, if you use the current UNIX_TIMESTAMP you can have the years adjust themselves based on a range.
For example, my website requires users be at least 18 years old, so I range the years from at least 18 years ago MAX and go back 60-70-80 years etc for MIN (Date of Birth) This means 2 years after your app is launched, you haven't had to edit the min and max ranges. On 14 February 2011 04:07, John Hardy <john.c.ha...@gmail.com> wrote: > http://php.net/date with http://php.net/strtotime > > Sent from my iPhone > > On Feb 13, 2011, at 8:02 PM, Krissy Masters <naked.cake.ba...@gmail.com> > wrote: > > > When using selects for years 19xx - 20xx in different places on the site > I > > found in the new year I had to go thru sites and set the max year to > select > > from. Pain! > > > > So I now have done in core.php > > > > Configure::write('MAX_YEAR_SELECT', '2011'); > > Configure::write('MIN_YEAR_SELECT', '1980'); > > > > Then in select inputs for the range simply > > > > echo $this->Form->year( > > 'School.year_set', > > Configure::read('MAX_YEAR_SELECT'); > > Configure::read('MIN_YEAR_SELECT'); > > > > So next year simply update in 1 place. Is there a better, cleaner way? > > > > Thanks > > > > K > > > > > > > > > > -- > > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > > > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- Kind Regards Stephen @ NinjaCoderMonkey www.ninjacodermonkey.co.uk -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php