mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-05 07:06:25 +00:00
Added default option for the short/long date and time formats.
Monotone-Parent: d4cbb070b0884fc3766c385032a8d95bc3f432a4 Monotone-Revision: f6e09cdea7e72d0dfcc010c17daadb672ea4a779 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-10-08T16:24:31 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
14
ChangeLog
14
ChangeLog
@@ -1,3 +1,17 @@
|
||||
2009-10-08 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/PreferencesUI/UIxPreferences.m (-shortDateFormatsList): added
|
||||
"default" option.
|
||||
(-itemShortDateFormatText): added formatting for "default" option.
|
||||
(-userShortDateFormat): falls back to "default" if not set for the user.
|
||||
(-setUserShortDateFormat): removes user default if set to
|
||||
"default".
|
||||
(-longDateFormatsList, -itemLongDateFormatText,
|
||||
-userLongDateFormat, -setUserLongDateFormat): new "default" option
|
||||
support, like for the short date format.
|
||||
(- timeFormatsList, -itemTimeFormatText, -setUserTimeFormat): new
|
||||
"default" option support, like for the short date format.
|
||||
|
||||
2009-10-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Tests/webdavlib.py (MailDAVMailQuery._initSort): now handles the
|
||||
|
||||
@@ -26,14 +26,28 @@
|
||||
"Long Date Format :" = "Formato da Data (Longo) :";
|
||||
"Time Format :" = "Formato da Hora :";
|
||||
|
||||
"shortDateFmt_0" = "%m/%e/%Y";
|
||||
"shortDateFmt_1" = "%m/%e/%y";
|
||||
"shortDateFmt_2" = "%m/%d/%Y";
|
||||
"shortDateFmt_3" = "%m/%d/%y";
|
||||
"shortDateFmt_4" = "%y/%m/%d";
|
||||
"shortDateFmt_5" = "%Y-%m-%d";
|
||||
"shortDateFmt_6" = "%d-%b-%y";
|
||||
"shortDateFmt_7" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A, %B %d, %Y";
|
||||
"longDateFmt_1" = "%B %d, %Y";
|
||||
|
||||
@@ -26,14 +26,28 @@
|
||||
"Long Date Format :" = "Dlouhý formát data :";
|
||||
"Time Format :" = "Formát času :";
|
||||
|
||||
"shortDateFmt_0" = "%m/%e/%Y";
|
||||
"shortDateFmt_1" = "%m/%e/%y";
|
||||
"shortDateFmt_2" = "%m/%d/%Y";
|
||||
"shortDateFmt_3" = "%m/%d/%y";
|
||||
"shortDateFmt_4" = "%y/%m/%d";
|
||||
"shortDateFmt_5" = "%Y-%m-%d";
|
||||
"shortDateFmt_6" = "%d-%b-%y";
|
||||
"shortDateFmt_7" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A, %B %d, %Y";
|
||||
"longDateFmt_1" = "%B %d, %Y";
|
||||
|
||||
@@ -26,12 +26,28 @@
|
||||
"Long Date Format :" = "Lang datumformaat:";
|
||||
"Time Format :" = "Tijdformaat:";
|
||||
|
||||
"shortDateFmt_0" = "%d/%m/%Y";
|
||||
"shortDateFmt_1" = "%d/%m/%y";
|
||||
"shortDateFmt_2" = "%d.%m.%y";
|
||||
"shortDateFmt_3" = "%d-%m-%y";
|
||||
"shortDateFmt_4" = "%Y-%m-%d";
|
||||
"shortDateFmt_5" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A %e %B %Y";
|
||||
"longDateFmt_1" = "%e %b. %Y";
|
||||
|
||||
@@ -26,15 +26,31 @@
|
||||
"Long Date Format :" = "Long Date Format :";
|
||||
"Time Format :" = "Time Format :";
|
||||
|
||||
"shortDateFmt_0" = "%m/%e/%Y";
|
||||
"shortDateFmt_1" = "%m/%e/%y";
|
||||
"shortDateFmt_2" = "%m/%d/%Y";
|
||||
"shortDateFmt_3" = "%m/%d/%y";
|
||||
"shortDateFmt_4" = "%y/%m/%d";
|
||||
"shortDateFmt_5" = "%Y-%m-%d";
|
||||
"shortDateFmt_6" = "%d-%b-%y";
|
||||
"shortDateFmt_7" = "";
|
||||
"default" = "Default";
|
||||
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A, %B %d, %Y";
|
||||
"longDateFmt_1" = "%B %d, %Y";
|
||||
"longDateFmt_2" = "%A, %d %B, %Y";
|
||||
|
||||
@@ -26,12 +26,28 @@
|
||||
"Long Date Format :" = "Style de date longue :";
|
||||
"Time Format :" = "Style de l'heure :";
|
||||
|
||||
"shortDateFmt_0" = "%d/%m/%Y";
|
||||
"shortDateFmt_1" = "%d/%m/%y";
|
||||
"shortDateFmt_2" = "%d.%m.%y";
|
||||
"shortDateFmt_3" = "%d-%m-%y";
|
||||
"shortDateFmt_4" = "%Y-%m-%d";
|
||||
"shortDateFmt_5" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A %e %B %Y";
|
||||
"longDateFmt_1" = "%e %b. %Y";
|
||||
|
||||
@@ -26,12 +26,28 @@
|
||||
"Long Date Format :" = "Langes Datumsformat:";
|
||||
"Time Format :" = "Zeitformat:";
|
||||
|
||||
"shortDateFmt_0" = "%d/%m/%Y";
|
||||
"shortDateFmt_1" = "%d/%m/%y";
|
||||
"shortDateFmt_2" = "%d.%m.%y";
|
||||
"shortDateFmt_3" = "%d-%m-%y";
|
||||
"shortDateFmt_4" = "%Y-%m-%d";
|
||||
"shortDateFmt_5" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A %e %B %Y";
|
||||
"longDateFmt_1" = "%e %b. %Y";
|
||||
|
||||
@@ -26,14 +26,28 @@
|
||||
"Long Date Format :" = "Hosszú dátumformátum :";
|
||||
"Time Format :" = "Időformátum :";
|
||||
|
||||
"shortDateFmt_0" = "%Y.%m.%d";
|
||||
"shortDateFmt_1" = "%m/%e/%y";
|
||||
"shortDateFmt_2" = "%m/%d/%Y";
|
||||
"shortDateFmt_3" = "%m/%d/%y";
|
||||
"shortDateFmt_4" = "%y/%m/%d";
|
||||
"shortDateFmt_5" = "%Y-%m-%d";
|
||||
"shortDateFmt_6" = "%d-%b-%y";
|
||||
"shortDateFmt_7" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%Y %B %d, %A";
|
||||
"longDateFmt_1" = "%B %d, %Y";
|
||||
|
||||
@@ -26,14 +26,28 @@
|
||||
"Long Date Format :" = "Data estesa:";
|
||||
"Time Format :" = "Formato ora:";
|
||||
|
||||
"shortDateFmt_0" = "%m/%e/%Y";
|
||||
"shortDateFmt_1" = "%m/%e/%y";
|
||||
"shortDateFmt_2" = "%m/%d/%Y";
|
||||
"shortDateFmt_3" = "%m/%d/%y";
|
||||
"shortDateFmt_4" = "%y/%m/%d";
|
||||
"shortDateFmt_5" = "%Y-%m-%d";
|
||||
"shortDateFmt_6" = "%d-%b-%y";
|
||||
"shortDateFmt_7" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A, %B %d, %Y";
|
||||
"longDateFmt_1" = "%B %d, %Y";
|
||||
|
||||
@@ -26,14 +26,28 @@
|
||||
"Long Date Format :" = "Длинный формат даты :";
|
||||
"Time Format :" = "Формат времени :";
|
||||
|
||||
"shortDateFmt_0" = "%e/%m/%Y";
|
||||
"shortDateFmt_1" = "%d/%m/%Y";
|
||||
"shortDateFmt_2" = "%e-%m-%y";
|
||||
"shortDateFmt_3" = "%d-%m-%y";
|
||||
"shortDateFmt_4" = "%y/%m/%d";
|
||||
"shortDateFmt_5" = "%Y-%m-%d";
|
||||
"shortDateFmt_6" = "%d-%b-%y";
|
||||
"shortDateFmt_7" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A %e %B %Y";
|
||||
"longDateFmt_1" = "%e %b. %Y";
|
||||
|
||||
@@ -31,16 +31,28 @@
|
||||
"Long Date Format :" = "Formato de fecha largo: ";
|
||||
"Time Format :" = "Formato de hora: ";
|
||||
|
||||
"shortDateFmt_0" = "%e/%m/%Y";
|
||||
"shortDateFmt_1" = "%d/%m/%Y";
|
||||
"shortDateFmt_2" = "%e/%m/%y";
|
||||
"shortDateFmt_3" = "%d/%m/%y";
|
||||
"shortDateFmt_4" = "%e-%m-%y";
|
||||
"shortDateFmt_5" = "%d-%m-%y";
|
||||
"shortDateFmt_6" = "%e-%m-%Y";
|
||||
"shortDateFmt_7" = "%d-%m-%Y";
|
||||
"shortDateFmt_8" = "%Y-%m-%d";
|
||||
"shortDateFmt_9" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A, %e %B %Y";
|
||||
"longDateFmt_1" = "%A, %e de %B de %Y";
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
BOOL hasChanged, composeMessageTypeHasChanged;
|
||||
}
|
||||
|
||||
- (NSString *) userLongDateFormat;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* UIXPREFERENCES_H */
|
||||
|
||||
@@ -173,7 +173,7 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
unsigned int nbr;
|
||||
BOOL done;
|
||||
|
||||
shortDateFormatsList = [NSMutableArray array];
|
||||
shortDateFormatsList = [NSMutableArray arrayWithObject: @"default"];
|
||||
|
||||
nbr = 0;
|
||||
done = NO;
|
||||
@@ -195,19 +195,41 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
|
||||
- (NSString *) itemShortDateFormatText
|
||||
{
|
||||
return [today descriptionWithCalendarFormat: item
|
||||
locale: locale];
|
||||
//locale: [context valueForKey: @"locale"]];
|
||||
NSString *todayText, *shortDateFormatText;
|
||||
|
||||
if ([item isEqualToString: @"default"])
|
||||
{
|
||||
todayText = [today descriptionWithCalendarFormat: [locale objectForKey: NSShortDateFormatString]
|
||||
locale: locale];
|
||||
shortDateFormatText = [NSString stringWithFormat: @"%@ (%@)",
|
||||
[self labelForKey: item],
|
||||
todayText];
|
||||
}
|
||||
else
|
||||
shortDateFormatText = [today descriptionWithCalendarFormat: item
|
||||
locale: locale];
|
||||
|
||||
return shortDateFormatText;
|
||||
}
|
||||
|
||||
- (NSString *) userShortDateFormat
|
||||
{
|
||||
return [userDefaults objectForKey: @"ShortDateFormat"];
|
||||
NSString *shortDateFormat;
|
||||
|
||||
shortDateFormat = [userDefaults objectForKey: @"ShortDateFormat"];
|
||||
|
||||
if (!shortDateFormat)
|
||||
shortDateFormat = @"default";
|
||||
|
||||
return shortDateFormat;
|
||||
}
|
||||
|
||||
- (void) setUserShortDateFormat: (NSString *) newFormat
|
||||
{
|
||||
[userDefaults setObject: newFormat forKey: @"ShortDateFormat"];
|
||||
if ([newFormat isEqualToString: @"default"])
|
||||
[userDefaults removeObjectForKey: @"ShortDateFormat"];
|
||||
else
|
||||
[userDefaults setObject: newFormat forKey: @"ShortDateFormat"];
|
||||
}
|
||||
|
||||
- (NSArray *) longDateFormatsList
|
||||
@@ -217,7 +239,7 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
unsigned int nbr;
|
||||
BOOL done;
|
||||
|
||||
longDateFormatsList = [NSMutableArray array];
|
||||
longDateFormatsList = [NSMutableArray arrayWithObject: @"default"];
|
||||
|
||||
nbr = 0;
|
||||
done = NO;
|
||||
@@ -234,24 +256,47 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
done = YES;
|
||||
}
|
||||
|
||||
if (![longDateFormatsList containsObject: [self userLongDateFormat]])
|
||||
[longDateFormatsList addObject: [self userLongDateFormat]];
|
||||
|
||||
return longDateFormatsList;
|
||||
}
|
||||
|
||||
- (NSString *) itemLongDateFormatText
|
||||
{
|
||||
return [today descriptionWithCalendarFormat: item
|
||||
locale: locale];
|
||||
//locale: [context valueForKey: @"locale"]];
|
||||
NSString *todayText, *longDateFormatText;
|
||||
|
||||
if ([item isEqualToString: @"default"])
|
||||
{
|
||||
todayText = [today descriptionWithCalendarFormat: [locale objectForKey: NSDateFormatString]
|
||||
locale: locale];
|
||||
longDateFormatText = [NSString stringWithFormat: @"%@ (%@)",
|
||||
[self labelForKey: item],
|
||||
todayText];
|
||||
}
|
||||
else
|
||||
longDateFormatText = [today descriptionWithCalendarFormat: item
|
||||
locale: locale];
|
||||
}
|
||||
|
||||
- (NSString *) userLongDateFormat
|
||||
{
|
||||
return [userDefaults objectForKey: @"LongDateFormat"];
|
||||
NSString *longDateFormat;
|
||||
|
||||
longDateFormat = [userDefaults objectForKey: @"LongDateFormat"];
|
||||
|
||||
if (!longDateFormat)
|
||||
longDateFormat = @"default";
|
||||
|
||||
return longDateFormat;
|
||||
}
|
||||
|
||||
- (void) setUserLongDateFormat: (NSString *) newFormat
|
||||
{
|
||||
[userDefaults setObject: newFormat forKey: @"LongDateFormat"];
|
||||
if ([newFormat isEqualToString: @"default"])
|
||||
[userDefaults removeObjectForKey: @"LongDateFormat"];
|
||||
else
|
||||
[userDefaults setObject: newFormat forKey: @"LongDateFormat"];
|
||||
}
|
||||
|
||||
- (NSArray *) timeFormatsList
|
||||
@@ -261,7 +306,7 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
unsigned int nbr;
|
||||
BOOL done;
|
||||
|
||||
timeFormatsList = [NSMutableArray array];
|
||||
timeFormatsList = [NSMutableArray arrayWithObject: @"default"];
|
||||
|
||||
nbr = 0;
|
||||
done = NO;
|
||||
@@ -283,9 +328,21 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
|
||||
- (NSString *) itemTimeFormatText
|
||||
{
|
||||
return [today descriptionWithCalendarFormat: item
|
||||
locale: locale];
|
||||
//locale: [context valueForKey: @"locale"]];
|
||||
NSString *todayText, *timeFormatText;
|
||||
|
||||
if ([item isEqualToString: @"default"])
|
||||
{
|
||||
todayText = [today descriptionWithCalendarFormat: [locale objectForKey: NSTimeFormatString]
|
||||
locale: locale];
|
||||
timeFormatText = [NSString stringWithFormat: @"%@ (%@)",
|
||||
[self labelForKey: item],
|
||||
todayText];
|
||||
}
|
||||
else
|
||||
timeFormatText = [today descriptionWithCalendarFormat: item
|
||||
locale: locale];
|
||||
|
||||
return timeFormatText;
|
||||
}
|
||||
|
||||
- (NSString *) userTimeFormat
|
||||
@@ -295,7 +352,10 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
|
||||
- (void) setUserTimeFormat: (NSString *) newFormat
|
||||
{
|
||||
[userDefaults setObject: newFormat forKey: @"TimeFormat"];
|
||||
if ([newFormat isEqualToString: @"default"])
|
||||
[userDefaults removeObjectForKey: @"TimeFormat"];
|
||||
else
|
||||
[userDefaults setObject: newFormat forKey: @"TimeFormat"];
|
||||
}
|
||||
|
||||
- (NSArray *) daysList
|
||||
|
||||
@@ -26,14 +26,28 @@
|
||||
"Long Date Format :" = "Dyddiad fformat hir :";
|
||||
"Time Format :" = "Fformat amser :";
|
||||
|
||||
"shortDateFmt_0" = "%m/%e/%Y";
|
||||
"shortDateFmt_1" = "%m/%e/%y";
|
||||
"shortDateFmt_2" = "%m/%d/%Y";
|
||||
"shortDateFmt_3" = "%m/%d/%y";
|
||||
"shortDateFmt_4" = "%y/%m/%d";
|
||||
"shortDateFmt_5" = "%Y-%m-%d";
|
||||
"shortDateFmt_6" = "%d-%b-%y";
|
||||
"shortDateFmt_7" = "";
|
||||
"shortDateFmt_0" = "%d-%b-%y";
|
||||
|
||||
"shortDateFmt_1" = "%d-%m-%y";
|
||||
"shortDateFmt_2" = "%d/%m/%y";
|
||||
"shortDateFmt_3" = "%e/%m/%y";
|
||||
|
||||
"shortDateFmt_4" = "%d-%m-%Y";
|
||||
"shortDateFmt_5" = "%d/%m/%Y";
|
||||
|
||||
"shortDateFmt_6" = "%m-%d-%y";
|
||||
"shortDateFmt_7" = "%m/%d/%y";
|
||||
"shortDateFmt_8" = "%m/%e/%y";
|
||||
|
||||
"shortDateFmt_9" = "%y-%m-%d";
|
||||
"shortDateFmt_10" = "%y/%m/%d";
|
||||
"shortDateFmt_11" = "%y.%m.%d";
|
||||
|
||||
"shortDateFmt_12" = "%Y-%m-%d";
|
||||
"shortDateFmt_13" = "%Y/%m/%d";
|
||||
"shortDateFmt_14" = "%Y.%m.%d";
|
||||
|
||||
"shortDateFmt_15" = "";
|
||||
|
||||
"longDateFmt_0" = "%A, %B %d, %Y";
|
||||
"longDateFmt_1" = "%B %d, %Y";
|
||||
|
||||
Reference in New Issue
Block a user