| re: "Split & Parts" different results in Firefox & IExplorer
JRS: In article <f%tqd.889$I52.36815@news.optus.net.au>, dated Mon, 29
Nov 2004 00:24:43, seen in news:comp.lang.javascript, RobG
<rgqld@iinet.net.auau> posted :[color=blue]
>
> function LZ(x) { return (x<0||x>=10?"":"0") + x }
> </script>
>
> You may want not want to add leading zeros to single digit months and
> days - it isn't necessary for ISO 8601 compliance but some think it
> looks better.[/color]
<BIG><BIG><BIG> HO YES IT IS NECESSARY </BIG></BIG></BIG>
ISO8601:2000(E) 5.2.1 is clear; and probably so for other values of E.
The year, except by agreement, should also be four digits (more after
9999).
In Y-D dates, D must be 3 digits.
Unless field lengths are constant, and separators do not fluctuate, the
full advantages of 8601 do not accrue - fixed-length dates can be sorted
as strings, fields can be extracted by position, ...
I predict an update, ISO8601:9???, making 5-digit years mandatory.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc. |