[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #8884] NSCalendarDate +dateWithString:calendarFormat: problem
From: |
Günther Noack |
Subject: |
[bug #8884] NSCalendarDate +dateWithString:calendarFormat: problem |
Date: |
Mon, 13 Nov 2006 12:36:27 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 |
Follow-up Comment #3, bug #8884 (project gnustep):
Could you please open this bug again, it's still not working as it should.
Here's proof (I used io from the Etoile repository for this, but it uses the
GNUstep frameworks.)
------- PROOF START --------
Io> date := NSCalendarDate alloc
==> Io2Objc_0x9025b80:
Io> date := date initWithString:calendarFormat:("2006-08-03T12:50:24+02:00",
"%Y-%m-%d")
==> Io2Objc_0x9025b80:
Io> date description
==> 2006-08-03 // problem: only first part was parsed, unmatching pattern
not detected!
Io> date := NSCalendarDate dateWithString:calendarFormat:("2006-08-03 +0100",
"%Y-%m-%d %Z") description
2006-11-12 00:47:07.916 ioobjc[1320] Unknown time zone name ‘+’.
==> 2006-08-03 GMT+0000 // problem: time zone not recognized, but issue
ignored
Io> date := NSCalendarDate dateWithString:calendarFormat:("", "%Y-%m-%d")
description
2006-11-12 00:53:33.876 ioobjc[1320] File NSCalendarDate.m: 1356. In
[NSCalendarDate -initWithYear:month:day:hour:minute:second:timeZone:] invalid
month given - 0
2006-11-12 00:53:33.876 ioobjc[1320] File NSCalendarDate.m: 1361. In
[NSCalendarDate -initWithYear:month:day:hour:minute:second:timeZone:] invalid
day given - 0
==> 0000-01-00 // problem: not only did it parse wrong, it also set the day
to 0,
// which is guaranteed not to happen in the documentation to
the method.
------- PROOF END -------
Another issue is that there are some (potentially broken) time zone
names
like "+0000"
(Real life example: "<lastBuildDate>Fri, 10 Nov 2006 16:28:30
+0000</lastBuildDate>", found
in http://www.symlink.ch/symlinkch.rss. How can I parse that with that
method?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?8884>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #8884] NSCalendarDate +dateWithString:calendarFormat: problem,
Günther Noack <=