This project is archived and is in readonly mode.

#1062 ✓invalid
engineerDave

Problem working with dates

Reported by engineerDave | September 16th, 2008 @ 08:03 PM | in 2.x

I am working on a project that involves tracking information for church congregations.

One of them is older 1858 and when I pushed the date helper start date back to 1850, when 1858 is chosen from that point forward I can only see a date range from 1850 - 1855. And if I submit it as null. then from that point forward I can only choose a date that is 1850 or before. However when I null the whole date month, day, and year and submit then the date correctly lets me choose from 1850 forward. See Picture 1,3,4,5. Those were taken in sequence.

This is the line I use to call my helper. My controllers and models are fairly vanilla as I am new to rails so most of it is "book" syntax and style.

...

Year Built <%= date_select(:congregations, :built, :order => [:month, :day, :year], :include_blank => true, :start_year => 1850) %>

...

I am running rails 2.1.0 on OS X 10.5.4 updated via gems.

Also I can't call dates earlier than 107 years with distance_of_time_in_words_to_now. I get this error if the date is earlier than 1902. (Picture 6) Anything that is 1902 or sooner works fine. For my project this isn't a huge deal but I was just thinking if someone did something historical based project it would be a very big problem.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Tags

Pages