[#3006] CVS repository — "Eugene Scripnik" <hoaz@...>

Hello.

21 messages 2004/06/16
[#3008] Re: CVS repository — ts <decoux@...> 2004/06/16

>>>>> "E" == Eugene Scripnik <hoaz@gala.net> writes:

[#3009] Re: CVS repository — Michal Rokos <michal@...> 2004/06/16

Hi!

[#3057] Ruby 1.8.2 to be released. — matz@... (Yukihiro Matsumoto)

Hi,

20 messages 2004/06/23

Re: Date.from_time

From: nobu.nokada@...
Date: 2004-06-15 01:38:26 UTC
List: ruby-core #2997
Hi,

At Tue, 15 Jun 2004 04:51:15 +0900,
Berger, Daniel wrote in [ruby-core:02995]:
> Well, the Date class has a parse() method.  Unfortunately, it doesn't
> seem able to parse stringified Time objects.  I think the ideal solution
> is to make it understand so that this would be legal:
> 
> require "date"
> t = Time.now
> d = Date.new(Date.parse(t.to_s)[0..2]) # or whatever

Both of Date and DateTime can parse it.

  $ ruby18 -rdate -e 't = Time.now.to_s; puts t, DateTime.parse(t), Date.parse(t)'
  Tue Jun 15 10:34:04 JST 2004
  2004-06-15T10:34:04+0900
  2004-06-15

-- 
Nobu Nakada

In This Thread

Prev Next