![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: CSV and regex s.split(",") and empty fields In microsoft.public.scripting.jscript message <rc#vxLRLKHA.7496@xxxxxx GHUB02.phx.gbl>, Fri, 4 Sep 2009 03:51:00, "Thomas Sun [MSFT]" <v- thsun@xxxxxx> posted: JScript : Quote: Quote: Quote: >>>Will the new engine fix the .toFixed bug (not mentioned on >>><http://msdn.microsoft.com/en-us/library/sstyff0z(VS.85).aspx>) which >>>means for example that 0.007.toFixed(2) returns "0.00"? >Yes, it will return "0.00". The toFixed Method doesn't round down. two are equally near. Quote: >If you >expect that result is "0.01", you can try the follow code: >========================= > <script type="text/jscript"> > > Number.prototype.toFixed = function(precision) { > var obj = Math.pow(10, precision || 0); > return String(Math.round(this * obj ) / obj ); > } > > </script> >======================== non-integer number to string. See the yellow box at <URL:http://www.merlyn.demon.co.uk/js-round.htm#toF>, comparing toFixed in IE with toFixed in other browsers. VBScript : Quote: Quote: Quote: > >>Will the ISO 8601 Week Number bug in VBScript DatePart be fixed? The MS >>>site does have an alternative (correct answers; but atrocious code) >>>function. My Web site refers, and has better code. >Based on my research, I located this known issue in our internal system and >its status is leave the behavior as-is and Microsoft issued a KB on >http://support.microsoft.com/kb/200299 to supply workarounds. thought more before implementing it. See <URL:http://www.merlyn.demon.co.uk/vb-date2.htm#DP>, using a browser that supports VBScript. Quote: >You also can post the feedback on the Connect Website >(https://connect.microsoft.com/IE/Feedback). Our developer will evaluate >them seriously and take them into consideration when designing future >release of the product. The above KB describes the error imperfectly (it omits 2101-01-02 = 2100-W52-7). The bug report is specifically for DatePart("ww", AnyDate, vbMonday, vbFirstFourDays) It occurs to me unlikely that the error in the routine affects only the combination vbMonday, vbFirstFourDays - but that is the only one that interests me. They should know that date code ought to be tested over all days in at least 28 & preferably 400 years. One is most unimpressed to see that new systems are being distributed with an old acknowledged bug that has a known fix available. Page <http://msdn.microsoft.com/en-us/library/20ee97hz(VS.80).aspx> says "(complies with ISO standard 8601, section 3.17)" - naively not saying which version of the standard - does not seem to match those of 2000 & 2004, could be the ancient 1988 one - does not mention the bug or its fix. Strangely, my IE8 does not load Microsoft pages such as those mentioned; Firefox has no difficulty. Note cross-post; consider setting follow-up. -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. 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 estrdate.htm js-dates.htm pas-time.htm critdate.htm etc. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Why the regex doesn't catch the "Extra" group? | VB Script | |||
| fields/"buttons" not functioning | Vista General | |||
| Populating "Artist, Song, Album..." fields automatically | Vista music pictures video | |||
| "Publish To E-mail" for split audio file in Windows Movie Maker | Vista music pictures video | |||
| Can't place cursor or tab into "password" fields | Vista General | |||