Format dates properly
Monotone-Parent: 11c5eefb2d127036af170d47dc0f555860e8c38a Monotone-Revision: 778b3664ce06bfae56a07b260fb9b9a241276d08 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-10-05T19:38:40 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
5e342d5e99
commit
5a357311c6
|
@ -4,6 +4,8 @@
|
|||
* Tests/webdavlib.py: Fixed errors in the URL regexp.
|
||||
* SoObjects/Mailer/EOQualifier+MailDAV.m: New category to generate IMAP
|
||||
qualifiers from DAV filters. (REPORT)
|
||||
* SoObjects/Mailer/EOQualifier+MailDAV.m: Formatted dates using
|
||||
([NSCalendarDate rfc822DateString]).
|
||||
|
||||
2009-10-04 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#import <SOGo/DOMNode+SOGo.h>
|
||||
|
||||
#import <NGCards/NSString+NGCards.h>
|
||||
#import <SoObjects/SOGo/NSCalendarDate+SOGo.h>
|
||||
|
||||
#import "EOQualifier+MailDAV.h"
|
||||
|
||||
|
@ -62,13 +63,16 @@
|
|||
endDate = [[current attribute: @"to"] asCalendarDate];
|
||||
if (startDate && [startDate isEqual: endDate])
|
||||
[qualifiers addObject:
|
||||
[NSString stringWithFormat: @"(on = '%@')", startDate]];
|
||||
[NSString stringWithFormat: @"(on = '%@')",
|
||||
[startDate rfc822DateString]]];
|
||||
else if (startDate)
|
||||
[qualifiers addObject:
|
||||
[NSString stringWithFormat: @"(since > '%@')", startDate]];
|
||||
[NSString stringWithFormat: @"(since > '%@')",
|
||||
[startDate rfc822DateString]]];
|
||||
if (endDate)
|
||||
[qualifiers addObject:
|
||||
[NSString stringWithFormat: @"(before < '%@')", endDate]];
|
||||
[NSString stringWithFormat: @"(before < '%@')",
|
||||
[endDate rfc822DateString]]];
|
||||
}
|
||||
// Sent date
|
||||
else if ([[current tagName] isEqualToString: @"date"])
|
||||
|
@ -77,13 +81,16 @@
|
|||
endDate = [[current attribute: @"to"] asCalendarDate];
|
||||
if (startDate && [startDate isEqual: endDate])
|
||||
[qualifiers addObject:
|
||||
[NSString stringWithFormat: @"(senton = '%@')", startDate]];
|
||||
[NSString stringWithFormat: @"(senton = '%@')",
|
||||
[startDate rfc822DateString]]];
|
||||
else if (startDate)
|
||||
[qualifiers addObject:
|
||||
[NSString stringWithFormat: @"(sentsince > '%@')", startDate]];
|
||||
[NSString stringWithFormat: @"(sentsince > '%@')",
|
||||
[startDate rfc822DateString]]];
|
||||
if (endDate)
|
||||
[qualifiers addObject:
|
||||
[NSString stringWithFormat: @"(sentbefore < '%@')", endDate]];
|
||||
[NSString stringWithFormat: @"(sentbefore < '%@')",
|
||||
[endDate rfc822DateString]]];
|
||||
}
|
||||
// Sequence
|
||||
else if ([[current tagName] isEqualToString: @"sequence"])
|
||||
|
|
Loading…
Reference in a new issue