[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Military time (whoops!)



Reply to note from "Robert Holmgren"  Tue, 13
Jun 2006 19:38:29 -0400

Robert:

> Fourth way (adapts your third way).

Yup yup, when all is said and done, that's the best way (the
pithiest). BUT... military time requires a 2-digit hour (hhmm),
and I forgot that Editor's default MT=1 doesn't append a leading
zero to one-digit hours; so the routine has to do that as well!
Before each , need to insert code such as:

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}IF{<}VA|01{>}<4{>}{<}SX01,"0"+{<}IS01{>}{>}{<}EI{>}
-nd
XPLeNCODE

Here's a fifth way, which ignores default MT (adapts your fourth
way):

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}SX01,{<}VA$TM{>}{>}{<}SV02,{027}S{>}{<}XS01,02,02,,03{>}{<
}IF{<}VA{021}03{>}<1{>}{<}IF{<}IS03{>}{240}"P"{>}{<}SX02,{<}P
V02{>}+12{>}{<}EI{>}{<}SX03,{<}VA@03 1{>}{>}{<}EI{>}{<}SX01,{
<}IS02{>}+{<}IS03{>}{>}{<}IF{<}VA|01{>}<4{>}{<}SX01,"0"+{<}IS
01{>}{>}{<}EI{>}{<}PR@01{>}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE

There's a sixth way (using the {27}N parsing wildcard), but it
confers no advantage, and requires profligate use of S/Gs.

--
Carl Distefano
cld@xxxxxxxx