Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Age to birth year
eggie5
9/25/2007 5:47:00 PM
Given the string "18" which is the age of a person, how can I get the
year of birth?
2 Answers
Guest
9/25/2007 5:55:00 PM
0
eggie5 schrieb:
> Given the string "18" which is the age of a person, how can I get the
> year of birth?
Time.now.year - 18
Regards
Jan
Guest
9/25/2007 5:57:00 PM
0
eggie5 schrieb:
> Given the string "18" which is the age of a person, how can I get the
> year of birth?
Time.now.year - '18'.to_i
But this is only an approximation. ;)
Regards
Jan
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Age to birth year
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password