You don't seem to understand that the result of 6!:0 is a numeric vector. Perhaps the documentation of "m0" should be changed to make this clearer - it is somewhat misleading to state that the result of this is in "yyyy mm dd hh mm ss" form; maybe this should be "yyyy [m]m [d]d [h]h [m]m [s]s" but that's clunky looking and most people understand that formatting with leading zeroes does not apply to numbers.
"m5" does not fail - works as stated. From the context it looks as though "m5" is not intended to be used standalone but rather as part of a larger definition as in "m7". If I were going to quibble with the format of any of these, I would start by pointing out that something like "2008/01/21" is an unusual way to format a date. Whether or not it includes leading zeroes is less pertinent than the non-standard ordering. On 1/21/08, Matthew Brand <[EMAIL PROTECTED]> wrote: > > The phrases page: > > http://www.jsoftware.com/help/phrases/date_time.htm > > should be updated because some of the example phrases > do not work in January. > > Replacing all instances of the primative ": with this: > > (all on one line, problem with Yahoo! Mail) > ts2string =. [: ;:^:_1 [: > ((]`([:'0'&,]))@.(1:=#)@":&.>) [: <"(0) ] > > might solve the problem. > > i.e. > > NB. example time stamp that can occur in January > ts =. 2008 1 1 21 39 5.343 > m5=: ('/'"_) 4 7} ": > m5 ts NB. this fails but is in the J phrases > 2008/1 / 21 39 5.343 > > ts2string =. [: ;:^:_1 [: > ((]`([:'0'&,]))@.(1:=#)@":&.>) [: <"(0) ] > ts2string ts > 2008 01 01 21 39 5.343 > #ts2string ts > 22 > m5_new=: ('/'"_) 4 7} ts2string > m5_new ts NB. succeeds > 2008/01/01 21 39 5.343 > > > > > __________________________________________________________ > Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
