search for: some_date

Displaying 7 results from an estimated 7 matches for "some_date".

Did you mean: some_data
2006 Jan 21
4
Migrations and Time datatype. Bug?
I''ve defined a table with these columns t.column "some_date", :date, :null => false t.column "some_time", :time, :null => false The result in schema.rb is t.column "some_date", :date, :null => false t.column "some_time", :time, :default => Sat Jan 01 00:00:00 GMT Standard Time 2000, :null => false The tim...
2008 Jun 28
14
Date Field convert to Seconds since Epoch
Hi, I was wandering if anyone could help me with this problem: Right now I am using a field in my database which is of type ''Date'' (in the form dd-mm-yyyy). I would like to convert this value (for example 26-06-08) into a number of seconds since epoch or into another form so I can compare it with todays date (from Date.now) so that I can tell the difference between the two dates
2008 Nov 10
3
Runt Recurring events
...if it includes a certain date, which is populates from the database, and display the info for that date if it is included. I have recurring events for every week, which was pretty easy to set up. I can just say: r = Runt::DIWeek.new(4) For a recurring event every Thursday, and then do r.include(some_date) to see if it falls on a Thursday. The question I have is for developing recurring events for other time limits, such as twice a month/every other week, once a month, once every other month, once every six months. To create Runt expressions for every other week, you can create an expression using...
2006 Mar 14
21
Changing default date format in Rails
I''ve spent all day digging through the rails api and postgres-pr on this, I think it''s time to ask the list. Postgres stores a Date in YYYY-MM-DD format. My users want the dates in MM/DD/YYYY format. Sure, I could explicitly convert it on the app level every place where a date is displayed, but that seemed like a DRY violation. I thought I''d be clever and simply
2006 Mar 23
5
Custom date format
Hi, I''ve followed these directions : http://railswiki.pdxruby.org/HowToDefineYourOwnDateFormat.html It seems pretty straightforward but obviously it doesn''t work for me... article.date_edited.to_formatted_s(:my_format_1) produce a default formatted date, not the one I''ve defined in environment.rb : ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(
2006 Jan 27
2
distance_of_time_in_words_to_now
any idea how to use distance_of_time_in_words_to_now? -- Posted via http://www.ruby-forum.com/.
2008 Nov 21
5
Getting the number of years between two dates
Hey, I need to get the number of years (as a number) between two dates. Here is what I have as a helper. # Returns the number of years between now and the specified date. def years_ago(date) dateDifference = DateTime.now - date results =Date.day_fraction_to_time(dateDifference) return results[0] / 24 / 365; end I''m sure there is a better way to do this. What is it?