Summary: | when importing a vCard, zeros in the dates are required | ||
---|---|---|---|
Product: | [Applications] kaddressbook | Reporter: | Marco Costantini <marco.costantini71> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | VERIFIED NOT A BUG | ||
Severity: | major | CC: | jlayt, krammer, tokoe |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Marco Costantini
2010-08-01 15:46:58 UTC
It would appear kdepim is using a strict date parser, I'd guess QDate but I haven't checked. If you need a liberal date parser then KCaledarSystem::readDate() does that, just don't use the KGlobal calendar to access it as it may not be Gregorian and you'd get the wrong date. Hej Marco, BDAY:1900-5-19 is simply _invalid_ according to the RFC (2426/2425), so I see no point in supporting broken vCards. Please inform the creator of the software which creates such broken vCards so that he will fix his product. Ciao, Tobias (In reply to comment #2) > Hej Marco, > > BDAY:1900-5-19 is simply _invalid_ according to the RFC (2426/2425), so I see > no point in supporting broken vCards. Please inform the creator of the software > which creates such broken vCards so that he will fix his product. It is very likely that the broken vcards come from a highly proprietary product. Only those do not care about implementing standards correctly. Since it seems to we have a not to complex way to fix these vcards on reading (if I understand John's comment correctly), we should consider this at least for "import vcards" "Remember Postel's Prescription: Be generous in what you accept, rigorous in what you emit." (See http://www.faqs.org/docs/artu/ch11s06.html ) So I think that Kaddressbook should accept (of course only when importing vCards generated elsewhere) also dates in which the leading zeros are missing. The fix can is very simple: if the month or the day are one digit only, then add a leading zero. The broken vCards come from this Facebook application: http://www.facebook.com/apps/application.php?id=75422854687&ref=ts http://apps.facebook.com/getvcard/ which is probably proprietary, but certainly not a "highly proprietary" one. I'm with Postel :-) If a user wishes to 'escape' from a program that doesn't implement the standard properly and migrate to a program that does, then we should try import all their data where reasonable. I've checked and KDateTime::fromString() is also a 'generous' parser which would better suit the task as it is always a Gregorian calendar. |