[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

DateTime

Lucas Holland

12/17/2006 6:40:00 PM

Hi,

I've just checked out this: http://ruby.cenophobie.com/Rub...
Ruby cheat sheet. On the second page, DateTime is mentioned but when I
try the following:

DateTime::now

or

DateTime.now

it says that the constant DateTime is uninitalized.

Can anyone help?

--
Posted via http://www.ruby-....

7 Answers

Peter Szinek

12/17/2006 6:44:00 PM

0

> it says that the constant DateTime is uninitalized.
>
> Can anyone help?

Sure. You should add this line:

require â??dateâ??

you can find some more examples on date/time and other simple exercises
on my blog:

http://www.rubyra.../implementing-15-exercises-for-learning-a-new-programming...

HTH,
Peter

__
http://www.rubyra...




Lucas Holland

12/17/2006 6:48:00 PM

0

Peter Szinek wrote:
> Sure. You should add this line:
>
> require â??dateâ??

Thanks a lot, Peter. It works fine now.

--
Posted via http://www.ruby-....

Ayaz Ahmed Khan

12/18/2006 5:52:00 AM

0

"Lucas Holland" typed:
> DateTime::now
> or
> DateTime.now
>
> it says that the constant DateTime is uninitalized.

There is also "Time.now" which, as I see it, does not require any
module(s) to be loaded explicitly by the user. I haven't checked yet, but
do the two differ in any other way than the format in which they report
time?

--
Ayaz Ahmed Khan

It is impossible to defend perfectly against the attack of those who
want to die.

Rob Sanheim

12/18/2006 8:41:00 PM

0

On 12/18/06, Ayaz Ahmed Khan <ayaz@dev.slash.null> wrote:
> "Lucas Holland" typed:
> > DateTime::now
> > or
> > DateTime.now
> >
> > it says that the constant DateTime is uninitalized.
>
> There is also "Time.now" which, as I see it, does not require any
> module(s) to be loaded explicitly by the user. I haven't checked yet, but
> do the two differ in any other way than the format in which they report
> time?
>
> --

This older thread might clear up the confusion between DateTime and Time:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...

- rob

Ayaz Ahmed Khan

12/19/2006 5:53:00 AM

0

"Rob Sanheim" typed:
> On 12/18/06, Ayaz Ahmed Khan <ayaz@dev.slash.null> wrote:
>> There is also "Time.now" which, as I see it, does not require any
>> module(s) to be loaded explicitly by the user. I haven't checked yet, but
>> do the two differ in any other way than the format in which they report
>> time?
>
> This older thread might clear up the confusion between DateTime and Time:
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...

An insightful explanation. Thanks, Rob.

--
Ayaz Ahmed Khan

It is impossible to defend perfectly against the attack of those who
want to die.

steadyeddy4u

4/16/2013 6:19:00 AM

0

On Apr 15, 10:56 pm, GOP_Decline_and_Fall <D...@null.net> wrote:
> On Tue, 16 Apr 2013 01:08:14 +0000 (UTC), Gray Guest
>
> <No_email_for_...@wahoo.com> wrote:
> >"FEMA Camp Commander. Welcome to Agenda 21" <smappersmap...@gmail.com> wrote
> >innews:0423867a-ffec-4275-827b-07f27478f825@googlegroups.com:
>
> >> Damn polygamists -- and the GOP backed them.
>
> >Tye cool thing about you folks is you really don't know who is coming to kill
> >you.
>
> You realize one of the dead folks was an eight year old boy and other
> children got limbs blown off?
>
>
>
> >The look of surprise on your face, priceless.
>
> Are we to assume you are celebrating the Boston bombing then?

Guest is a bag of shit, just like you.

Gray Guest

4/17/2013 2:32:00 AM

0

GOP_Decline_and_Fall <Dev@null.net> wrote in
news:4sppm8pj339u8ltgqgnb8ms35pped83mpc@4ax.com:

> On Tue, 16 Apr 2013 01:08:14 +0000 (UTC), Gray Guest
><No_email_for_you@wahoo.com> wrote:
>
>>"FEMA Camp Commander. Welcome to Agenda 21" <smappersmapper@gmail.com>
>>wrote in news:0423867a-ffec-4275-827b-07f27478f825@googlegroups.com:
>>
>>> Damn polygamists -- and the GOP backed them.
>>>
>>
>>Tye cool thing about you folks is you really don't know who is coming to
>>kill you.
>
> You realize one of the dead folks was an eight year old boy and other
> children got limbs blown off?

Yes and I'm disgusted. To bad they didn't use a gun, you could have
masturbated to the video.

>
>
>>
>>The look of surprise on your face, priceless.
>
> Are we to assume you are celebrating the Boston bombing then?

No, I'm anticipating celebrating your death.


--
Refusenik #1

Libs suffer from Eleutherophobia. And there is no cure.

Obama called the SEALs and THEY got bin Laden. When the SEALs called Obama,
THEY GOT DENIED. Fuck Obama