Matthew Hannigan wrote:
On Thu, Sep 14, 2006 at 01:05:12PM +1000, Jamie Wilkinson wrote:
Do you want "this_hour + 1" to also increment by a day, or by an hour?

An hour of course. And today + 1 by a day.

I mean, HELLO!!!


Lets put in context. The examples given were,

today + 1 => means tomorrow
today + 7 => means 7 days from today or nextweek
today - 1  => means yesterday.

The real codes,
#cat my_codes.rb
require 'date'
puts today = Date.today         #=> prints 2006-09-15
puts tomorrow = today + 1    #=> prints 2006-09-16
puts yesterday = today - 1      #=> prints 2006-09-14
puts nextweek = today + 7     #=> prints 2006-09-22


Now regarding,

time + 1         #=>  means 1 hour from now when time is in hours
time + 1         #=> means  1 minute from now when time is in minute
time + 1         #=> means  1 second from now when time is in second

Now, the real codes, consider these your homework.

If you are mis-understanding my post, sorry. I hope this will
clarify.

O Plameras



_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to