similar to: Date and Time validator, updater

Displaying 20 results from an estimated 6000 matches similar to: "Date and Time validator, updater"

2006 Apr 09
6
Validating a DateTime
Hi, Does anyone know of a method to validate a DateTime field? I''ve looked at the validation docs and the validates_date / validates_time plug-in but I can''t find a method to validate a value in the format of yyyymmddhhmm. It seems like something that should exist already, so I''d just like to check before I attempt my own version... Cheers, Mark
2006 Mar 10
19
validates_date plugin for ActiveRecord
This plugin gives ActiveRecord the ability to do stricter date checking. Example: class Person < ActiveRecord::Base validates_date :date_of_birth end This will ensure that date_of_birth is a *valid* date. The date can be set initially as a string in any of the following formats: "2006-01-01" "1 Jan 06", or "1 Jan 2006" "1/1/06" # Day /
2006 Mar 23
5
validates_dateness_of ?
Hello all. I don''t suppose some enterprising soul with much more skill than me has whipped up a "validates_dateness_of" (Complete with leap year calculations) method for use with all the other validation methods and wishes to spread much much joy? Cheers Jeff "I can barely code RoR and rely on others to do the hard work" Jones -- Posted via
2006 Jun 15
4
parse only seem to understand US date format
I''ve tried Time.parse() and DateTime.parse() but they interpret the date as US format. Is there any way to tell it to interpret as dd/mm/yyyy? -- Posted via http://www.ruby-forum.com/.
2006 May 16
4
Date/Time Quick Add
I am building a small app that reuires some clever text pattern matching... In my controller, I''ll have a string that I will want to parse out to a datetime and a message, a la Google Calendar Quick Add. Examples: 10/30/2006 7pm message 10-30-96 7:00 pm message 10/30/2006 19:00pm message ... You see what I''m getting at. For a v1.0 release, I CAN publish some standards for
2006 Aug 04
1
Parsing Dates bewilderment
Ok, so to me this seems like a very trivial issue, but it is causing hours of frustration. I am hoping that an extra thousand or so sets of eyes will point out where I am obviously making a newbie mistake. I have the following string: "08-04-2006" representing August 4, 2006 I set my attribute ''po_date'' equal to this string and then save it to the database. My
2006 Jul 06
6
Help with overriding / overwriting date values in ActiveRecord to accept Euro Style Date from a Textbox
Hi guys, I''m trying to make an AR model which accepts a string data (from a text input) in euro date format eg <input .... value = "23/01/2006"> ( 23 Jan 2006) Reading the example from RDoc... i tried to overwrite/overload/override the = function to write in the date.. Cant get it to work because .. i dont knoe what format should it accept.. i''ve tried
2006 Jul 29
2
Cannot save Date field
Hi, I have a table which has a column called due_date. Datatype of this column in mySQL is "Date". Here is what I extracted from schema.rb > t.column "due_date", :date My fixture tasks.yml file has the following line > due_date: 07/17/2006 My test_task.rb has the following line > assert_equal "07/17/2006", @task.due_date When I run
2006 Jul 31
1
validate date field
hi, Below is an example of a text field I have, which works fine, until you enter an invalid date such as Feb 31st, which doesn''t exist Is there a way of checking this easily and returning an error message like validates_presence_of does ? <p><label for="project_client_deadline_date">Client Deadline Date:</label><br/> <%= date_select
2006 May 16
9
Date transform
hi all, i want my users to enter a date in "ddmmyyyy" format, do someone know how may i transform it in "yyyy-mm-dd" in the controler before i add it to the base please? thks irong -- Posted via http://www.ruby-forum.com/.
2006 May 11
4
string to date/time?
Hey All, Anyone know of a library for parsing "human" dates, like "this friday" or "2 days ago"? I used to use strtotime in php, but starting from here; http://wiki.rubyonrails.com/rails/pages/PhpStrtotime and doing lots of googling, I haven''t been able to find anything similar for ruby. I know of javascript solutions to this, but I''d need to do
2009 Jul 02
8
rails hyperthreading on Quad core
Hi, my video sharing website (politube.org) that I developed with rails, runs on lighttpd/fcgi (I know it is obsolete by now) and is severely under load and regularly blocks because the lighttpd process chews up 50% of RAM (1GB). So now I want to move the system to a new server with 8GB, 64bit , Quad core processor (intel i7 920) but I am not sure if hyperthreading will really do anything better.
2007 Oct 05
3
Do migration support MySQL BIGINT
hi, just wondering do migration support MySQL BIGINT ? what if i wanna create a migration with BIGINT ? should i use SQL directly ? kiwi -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2006 Jul 02
1
acts_as_modified, acts_as_ordered and validates_date_time
A quick note about acts_as_modified, acts_as_ordered and validates_date_time. If you are using any of those plugins you should update them. They''ve all had improvements/bug fixes. Also, acts_as_modified is now being maintained by both Chris Hall and myself. http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered http://svn.viney.net.nz/things/rails/plugins/acts_as_modified
2009 Feb 17
8
Converting Acts_As_Tree to Acts_As_Nested_Set
Hello, I have a tree structure that needs to be converted into a nested set. A great deal of work has already been done on the tree items, so maintaining the integrity of the id''s is mandatory. However I need the ability to access entire branches of the tree, which is what Nested set does. Does anyone have any suggestions on how to efficiently transfer the tree to the nested set and
2006 Jun 05
5
Regexp - date validation
Can somebody tell me why the following RegExp doesn''t work for date validation in Rails... It validates fine in RadRails -- using REgExp panel. Intended format: (mm/dd/yyyy): %r{^(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])(-|/)(19|20)([0-9][0-9])$} If i try the following, it works in Rails: %r{(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])} When I add the last piece, it
2008 Jul 17
4
A Mongrel parsing bug: "&" and "&amp;"
When using url_for to send path to a script (such as with auto_complete), multiple params are joined with the "&amp;" code. For example: text_field_with_auto_complete :blog :post, {}, { :posts_path(:a => 1, :b => 2), :method => :get } Produces this script: var blog_post_auto_completer = new Ajax.Autocompleter(''blog_post'',
2009 May 26
9
cookies are mandatory for Rails app?
is it true that Rails depend on cookies? It seems that flash is a part of session, and session uses cookies... so when i disable cookie in Firefox, what was working became ActionController::InvalidAuthenticityToken so is it true that for a RoR app to work, cookies are mandatory? -- Posted via http://www.ruby-forum.com/.
2007 Sep 20
2
Oracle date, i get 0007 instead of 2007
I''m running Oracle and in my table i have a field: SCHEDULED_DATE of type DATE. When I do a query model = MyModel.find(1) model.scheduled_date_before_type_case ends up being equal to ''0007-09-19'' instead of ''2007-09-19''. In the oracle adapter I ran a debug accross all the fields and got, just after it does the query and gets the results. -
2007 Aug 09
2
Rmovie on windows
Can rmovie be installed in a windows environment? When I run "gem install rmovie". It gives the following error: Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install rmovie ''make'' is not recognized as an internal or external