Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] loading a date!

From: carl:cybercraft at: 22-Jun-2004 9:27

>=== Original Message > > >Hello folks. I think I have some abnormal functionning here. I have three >words, 'a, 'b and 'c: > >>> a: "10-Dec-97/19:55:17/GMT" >== "10-Dec-97/19:55:17/GMT" >>> b: "10/Dec/97/19:55:17/GMT" >== "10/Dec/97/19:55:17/GMT" >>> c: "10-Dec-97/19:55:17" >== "10-Dec-97/19:55:17" > >They are indeed very similar, but 'b has slashes where 'a and 'c have dashes. >'A is append c "/GTM". But look what happens when I load these three: >>> load a >== [10-Dec-1997/19:55:17 /GMT >] >>> load b >== 10-Dec-1997/19:55:17 >>> load c >== 10-Dec-1997/19:55:17 > >>> type? load a >== block! >>> type? load b >== date! >>> type? load c >== date! > >It behaves like this on /View, /Core and /Core >Do you all agree that this is a bit weird?
Hmmm - not sure. No need to actually have the dates on disk to see the behaviour...
>> load "10-Dec-97/19:55:17/GMT"
== [10-Dec-1997/19:55:17 /GMT ]
>> load "10/Dec/97/19:55:17/GMT"
== 10-Dec-1997/19:55:17 but you'll notice this works...
>> load "10-Dec-97/19:55:17-GMT"
== 10-Dec-1997/19:55:17 so you could say you're not being consistant by using hyphens and a slash as the seperators with the format that returns a block. Except for the fact that this works...
>> load "10/Dec/97/19:55:17-GMT"
== 10-Dec-1997/19:55:17 :-) Wouldn't do any harm to report it to feedback. (Unless others here can argue it's consistant behaviour.) - Carl Read