Problem with Time.iso8601

(Chris Morris) #1

I'm assuming Time.now.iso8601 should work? Do I have a muffed
installation maybe? Do I have a muffed brain? :slight_smile: Any other ideas?

C:\TEMP>ruby -v
ruby 1.8.2 (2004-12-25) [i386-mswin32]

C:\TEMP>ri Time.iso8601
----------------------------------------------------------- Time#iso8601
聽聽聽聽聽iso8601(fraction_digits=0)

路路路

------------------------------------------------------------------------
聽聽聽聽聽Alias for #xmlschema

C:\TEMP>irb
irb(main):001:0> Time.now.iso8601
NoMethodError: undefined method `iso8601' for Wed Aug 10 13:21:07 Central Daylig
ht Time 2005:Time
聽聽聽聽聽聽聽聽from (irb):1
irb(main):002:0> Time.now.xmlschema
NoMethodError: undefined method `xmlschema' for Wed Aug 10 13:21:12 Central Dayl
ight Time 2005:Time
聽聽聽聽聽聽聽聽from (irb):2
irb(main):003:0> exit

--
Chris
http://clabs.org

(Jason Foreman) #2

irb(main):001:0> Time.now.iso8601
NoMethodError: undefined method `iso8601' for Wed Aug 10 13:29:36 GMT-6:00 2005:
Time
聽聽聽聽聽聽聽聽from (irb):1

irb(main):002:0> require 'time'
=> true

irb(main):003:0> Time.now.iso8601
=> "2005-08-10T13:29:39-05:00"

路路路

On 8/10/05, Chris Morris <the.chrismo@gmail.com> wrote:

I'm assuming Time.now.iso8601 should work? Do I have a muffed
installation maybe? Do I have a muffed brain? :slight_smile: Any other ideas?

(Chris Morris) #3

irb(main):002:0> require 'time'

Ah, muffed brain it is, then. :slight_smile:

Thx

路路路

--
Chris
http://clabs.org

(Kevin Olbrich) #4

I've been mucking about with regular expressions and have not managed to get
the POSIX style character classes (i.e., [:alnum:]) to work for me. Is this
a limitation of the platform I'm using, or am I missing some setting
somewhere?

Ruby 1.8.2 on WinXP (used the one-click installer).

-Kevin

(Nakada, Nobuyoshi) #5

Hi,

At Thu, 11 Aug 2005 05:28:37 +0900,
Kevin Olbrich wrote in [ruby-talk:151590]:

I've been mucking about with regular expressions and have not managed to get
the POSIX style character classes (i.e., [:alnum:]) to work for me. Is this
a limitation of the platform I'm using, or am I missing some setting
somewhere?

$ ruby -e 'p /[[:alnum:]]+/ =~ ":ab0d,fd"; p $&'
1
"ab0d"

$ ruby -e 'p /[[:alnum:],]+/ =~ ":ab0d,fd"; p $&'
1
"ab0d,fd"

路路路

--
Nobu Nakada