I suggest adding custom formats in way compatible to current 8!:0,
Use a previously unused character in format string eg. ':' to provide escape,

'5.2,:ddmmyy,6.2' or '5.2';':ddmmyy';'6.2'

5.2 and 6.2 will be processed by default 8!:0, but format :ddmmyy to be processed by a user written verb ddmmyy in the parent locale. As a proof of concept, replacing fmt with the following definition, and some rough edges have to be addressed to make it 100% compatible with 8!:0

fmt=: 3 : 0
y=. y.
8!:0 y
:
y=. y. [ x=. x.
sy=. $y
assert. 2=#sy
if. 0=L. x do. x=. <;._1 ',',x end.
sx=. $x
assert. 1=#sx
assert. sx={:sy
z=. 0$<''
for_ix. i.#x do.
  if. ':'={.fx=. >ix{x do.
    z=. z, ((}.fx),'__locP')~ ix{("1) y
  else.
    if. 1 e. (3!:0 e. 2 131072"_) &> ix{("1) y do.
      z=. z, fx 8!:0 ix{("1) y
    else.
      z=. z, fx 8!:0 {.&> ix{("1) y
    end.
  end.
end.
|:(|.sy)$z
)

My main reason for requesting custom format is to simplify formating and sorting date column.

--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to