search for: birthdates

Displaying 20 results from an estimated 33 matches for "birthdates".

Did you mean: birthdate
2006 Jan 22
23
calculate users age
i know it''s probably really simple, how do i work out someone''s age if i have their d.o.b. stored as a date in my db. cheers -- Posted via http://www.ruby-forum.com/.
2006 Jan 07
4
set date with date_select
when retreiving a date from a DATETIME field in a database, is there a way to set the date to the value of the DB in the view? It seems to always default to the current date... if I have a field called birthdate in the users table and i do @user = User.find(@params[:id]) in my view i have a <%= date_select ''birthdate'',''user'' %> but dont know how to
2006 Feb 20
1
extract month from date column
Hi, I have this rails query: @birthdays = Birthday.find :all, :conditions => ["user_id = ? and birthdate = ''2006-02-01'', @user_id], :limit => @birthday_pages.items_per_page, :offset => @birthday_pages.current.offset You can ignore the user_id, limit and offset part.
2007 Nov 03
3
Birthdate validation
Hello everyone, I''m almost cracking my head trying to do this birthdate validation. It turns out that I can only accept users with at least 18 years old and I''m trying to validate it writing this code on my user.rb fil at app/ models class User < ActiveRecord::Base validates_presence_of :full_name validates_presence_of :street_address validates_presence_of :city
2009 Feb 20
3
mean over previous cells
Dear RUsers, I guess this is an easy question for someone a little familiar with programming...(which I am not)... I've got 2 colummns, one shows just dates(SST_date, Class 'Date' num), the other one shows the SeaSurfaceTemperature (SST, num) at that certain date. SST_date SST 2008-01-01 22.2 2008-01-02 21.8 2008-01-03 22.8 2008-01-04 22.9 2008-01-05 23.1 2008-01-06 23.2 ...
2006 Jan 04
5
How do I set the default value for date fields?
I want my date fields to default to NIL or "", because the presence of a date means something. My problem is that rails is defaulting the fields to today''s date automatically when I create a new record through the scaffold. I tried removing the default ''0000-00-00'' and changing NOT NULL to NULL, but both columns get today''s date as the default
2006 Jan 19
2
date_select broken
I am using date_select and in some instances it only shows about 10 years worth of choices. Same form on other users shows the whole range. date_select looks like this <%= date_select ''user'',''birthdate'' , :start_year => 1940 %> I would expect to always see 1940-2006 or so , but i dont always do. Is there a way to force the range or explain why i
2008 Jan 12
2
Problems with date field
Hi, I''m creating a date type field to put birthdate, but the years on this field only go to 2003, what should I do?? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2009 Jul 02
3
Testing for membership in an array of strings
As an R beginner, I feel brain dead today as I can not find the answer to a relatively simple question. Given a array of string values, for example lets say "mary", "bob", "danny", "sue", and "jane". I am trying to determine how to perform a logical test to determine if a variable is an exact match for one of the string values in the array
2006 Jan 06
0
date_select and sessions
i am using date_select to allow someone to select their birthdate in a form. however date_select uses 3 wierd labels in the forms like follows: <select name="user[birthdate(1i)]"> <option value="1940">1940</option> <option value="1941">1941</option> . and then the month is user[birthdate(2i)] and so on. My issue is i dont know the
2006 Nov 02
0
DB: class to multiple rows mapping (aka rails 'osproperty')
Hi, Has anyone implemented some sort of automatic class to dynamic table mapping ? The idea is to have a single table capable of storing various unrelated classes. Some sort of Extreme polymorphism. I''ve used this with other languages. E.g. osproperty in Java. The idea is the following In the DB create table dynamicobjects ( id int, object_type varchar(255), key_name
2009 Mar 02
0
Implementing conditional read-only attributes of ActiveRecord objects
Hello, my goal is to implement the option of specifying a condition in attr_protected, attr_readonly and possibly other attribute methods in ActiveRecord objects. Rationale (example): class User < AR:Base # User should not be able to modify fields any more once they have been verified attr_readonly :firstname, :lastname, :gender_id, :birthdate, :if => :passport_verified? # ... end
2012 Nov 12
2
how to enter a string value
hi, I want to know just enter a string value entering a numeric value is make with the function scan () or scan (nmax = ..) but it does not work for string my goal is to enter three string: name and surname and date of birth I try with this code but it shows me errors print ("enter the name") name <- scan (nmax = 1) print ("enter the first name") firstName <- scan
2006 Feb 08
6
can''t get date_select to work
Hi, I render a couple of date_select fields, the HTML looks fine, I can see the values submitted back to the server, but AR doesn''t pick them up from the hash in Booking.new(params[''booking'']). I''ve got a ''booking'' object with parameters product, startdate and enddate. HTML snippets: <select
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 Dec 15
4
Why won't Rails update my object attributes?
Here''s the issue: When I submit a form for updating, @person.update_attributes doesn''t work. But the next nested clause for updating images DOES work. How is that possible? However no matter what I do the Person object will not change its attributes. def edit @person = Person.find(params[:id]) if request.post? @person.update_attributes(params[:person])
2006 Feb 22
1
managing dates in forms
Hi, I have a field for the user which is their birthday. I am letting them edit it and then save it if they want. However, the form displays the current date/time, and when they save the form without changing the birthdate (because they do not wish to set it), the current date/time gets saved to the db. How do I do this? I thought about having a hidden field which would be the current date/time
2009 Mar 26
1
Is there a public blacklist of hackers' IPaddresses?
...st MD5... and switching from MD5 to SHA-1 provides no significant defense against dictionary attacks. The only good way to keep passwords secure against dictionary attacks, is to make sure that the passwords aren't guessable by that means... no common words, no names, no simple permutations or birthdates or anything like that. Use a decent random-number generator and number-to-character conversion algorithm to generate SIP passwords that are sufficiently long and very DTR8FBWF_==F?Z@\.-+!N$ and you'll be well defended.
2012 Sep 15
0
Random Forest and Correlated Fields
Does anyone know if there are any special considerations with Random Forest and correlated fields or rather derived fields? For example if we are trying to predict who might leave our company to go work for another company some of the variables we may look at are below (in addition to others). Do we need to be cautious with comingling these especially since, for example with Age variable, all are
2007 Sep 21
1
calculate age of a person and compare it
how can i calculate the age of a person using database " birth date" my teble is user and column is bday .... now i want to calculate the age will some one please tell me how can i calculate the age.. actually i want to compare my two database fields birthdate and joining date ......that is why i need this.... will someone please tell me how can i do that