From: Chuck H. <ch...@gl...> - 2010-01-04 23:06:54
|
On Jan 4, 2010, at 3:01 PM, Simon wrote: > i've tested the following "usual suspects" in ajax examples and all > work fine: > > format = "%m/%d/%y"; > format = "%m/%d/%Y"; > format = "%d/%m/%y"; > format = "%d/%m/%Y"; > > do you have a standard list of formatters that you tested previously > that i can fire through ? Just whatever is in the AjaxExample app. But the above is probably "good enough" as a smoke test. Chuck > > Simon > > 2010/1/4 Chuck Hill <ch...@gl...> > Does it work for all the different formats? Does AjaxExamples still > work? > > > > On Jan 4, 2010, at 2:20 PM, Simon wrote: > > any objection to changing date.js to this ? > > http://code.google.com/p/datejs/ > > and a one line change in calendar.js (line 180): > > var result = Date.parseExact(s, {order: dateOrder}); > > then we can both be happy bunnies :-) > > simon > > > 2010/1/4 Chuck Hill <ch...@gl...> > IIRC date.js does some guessing for two digit years. Sounds like > the guessing may suffer from an accuracy issue. ;-) > > > > On Jan 4, 2010, at 1:45 PM, Simon wrote: > > hi ray - > > yeah, i agree. i've spent a couple of hours testing various > formatters and the general rule seems to be that if you use a 4 char > year format, everything works fine. use 2 chars for the year and you > start getting wonky results. > > when the results go wonky, they seem to be really random. sometimes > it's gets it right, sometimes it gets it wrong - and not just 2010 > dates. i found a few going back beyond 2003 that it was getting wrong. > > simon > > > 2010/1/4 Ray Kiddy <ra...@ga...> > > On Jan 4, 2010, at 12:39 PM, Ray Kiddy wrote: > > > On Jan 4, 2010, at 11:07 AM, Simon wrote: > > my pop-ups today are loading as 01 October 2004 instead of 04 > January 2010 > > anyone else seeing this ? > > i'm using format = "%d/%m/%y" > > once i select a date it then operates normally. popping the calendar > back open selects the correct date. it's null handling which appears > broken. > > not started debugging it yet but presume its going to be calendar.js > at fault ? > > simon > ------------------------------------------------------------------------------ > > Ah! I see that you are right. > > It seems that the text that is being displayed in the text box is > being rendered correctly, as I suggested. But it also seems clear > that the calendar.js that is in charge of drawing the calendar is > interpreting the format differently and so giving you a different > date. But the second time the popup is displayed, calendar.js is > parsing the date format correctly. Or has figured out the correct in > some other way? Weird. > > But I agree that it is a problem and I am sure I could even write > selenium tests that would verify that Wonder is doing the wrong > thing here. > > It seems that there are format strings which are very correct (such > as %d/%m/%Y) , some which are wrong, and some which are "somewhat > correct." You seem to be using one of this last group of "somewhat > correct" formats. > > And a workaround is to use a better format. We'll see if there are > other suggestions. > > cheers - ray > > > I think this might be a "wetware" issue and not a software issue. > > You say that you are using the format "%d/%m/%y". This would, I think, > translate to "date of month - slash - month of year - slash - year as > 2-digit number." > > If I put this into the Date Picker page in the AjaxExample app, then > when the page loads, I see: "04/01/10". This is "04" for the fourth, > "01" for January, and then "10" for 2010. This is one of the reasons > that using "%y" is not a good idea, Y2K bug or no. > > If it was "01 October 2010", you would see "01/10/10". You are not > seeing that. > > It would be more clear if you used the format "%d/%m/%Y", you would > then see "04/01/2010." It would then be more obvious that the date is > correct. > > cheers - ray > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc > > -- > Chuck Hill Senior Consultant / VP Development > > Practical WebObjects - for developers who want to increase their > overall knowledge of WebObjects or who are trying to solve specific > problems. > http://www.global-village.net/products/practical_webobjects > > > > > > > > > > -- > Chuck Hill Senior Consultant / VP Development > > Practical WebObjects - for developers who want to increase their > overall knowledge of WebObjects or who are trying to solve specific > problems. > http://www.global-village.net/products/practical_webobjects > > > > > > > > -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects |