Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Why this ruby code is not working
Raj Singh
2/4/2007 3:27:00 AM
Why the value of temp2 is not consistent with the value of temp.
Loading development environment.
>> list = []
=> []
>> (1..10).to_a.each do |i|
?> start_time_temp = i.days.ago.beginning_of_day
>> puts start_time_temp
>> temp2 = start_time_temp.strftime("%m-%B-%Y")
>> puts temp2
>> end
Fri Feb 02 00:00:00 -0500 2007
02-February-2007
Thu Feb 01 00:00:00 -0500 2007
02-February-2007
Wed Jan 31 00:00:00 -0500 2007
01-January-2007
Tue Jan 30 00:00:00 -0500 2007
01-January-2007
Mon Jan 29 00:00:00 -0500 2007
01-January-2007
Sun Jan 28 00:00:00 -0500 2007
01-January-2007
Sat Jan 27 00:00:00 -0500 2007
01-January-2007
Fri Jan 26 00:00:00 -0500 2007
01-January-2007
Thu Jan 25 00:00:00 -0500 2007
01-January-2007
Wed Jan 24 00:00:00 -0500 2007
01-January-2007
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
--
Posted via
http://www.ruby-...
.
1 Answer
Raj Singh
2/4/2007 3:47:00 AM
0
Never mind. I just need some coffee.
Sorry for the trouble.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Why this ruby code is not working
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