#119013 Cookie expire times reported twice / bug in FormatDateTime routine

r=nhotta/mkaply  sr=sspitzer a=asa
Added comment in idl file.
Changed kDateFormatLong from "%c" to "%x" for unix and os2
This commit is contained in:
shanjian%netscape.com 2002-03-09 00:01:59 +00:00
Родитель c079c63f04
Коммит e7c146ea67
3 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -83,6 +83,14 @@ interface nsIScriptableDateFormat : nsISupports {
const long dateFormatYearMonth =3; // formats using only the year and month
const long dateFormatWeekday = 4; // week day (e.g. Mon, Tue)
// Notes:
// The original definitions of dateFormatLong and dateFormatShort are from windows platform.
// dateFormatLong output will be like: Wednesday, January 29, 2003 4:02:14 PM
// dateFormatShort output will be like: 1/29/03 4:02:14 PM
// On platforms like Linux and OS2, it is rather difficult to achieve exact same output, and since we are aiming
// at human readers, it does not make sense to achieve exact same result. We should do just enough as the platform
// allow us to do, unless there is other strong reasons for other approaches.
const long timeFormatNone = 0; // don't include the time in the format string
const long timeFormatSeconds = 1; // provides the time format with seconds in the given locale
const long timeFormatNoSeconds = 2; // provides the time format without seconds in the given locale

Просмотреть файл

@ -71,8 +71,6 @@ nsresult nsDateTimeFormatOS2::FormatTMTime(nsILocale* locale,
UniStrcat( uFmtD, (UniChar*)L"");
break;
case kDateFormatLong:
UniStrcat( uFmtD, (UniChar*)L"%c");
break;
case kDateFormatShort:
UniStrcat( uFmtD, (UniChar*)L"%x");
break;

Просмотреть файл

@ -198,8 +198,6 @@ nsresult nsDateTimeFormatUnix::FormatTMTime(nsILocale* locale,
PL_strncpy(fmtD, "", NSDATETIME_FORMAT_BUFFER_LEN);
break;
case kDateFormatLong:
PL_strncpy(fmtD, "%c", NSDATETIME_FORMAT_BUFFER_LEN);
break;
case kDateFormatShort:
PL_strncpy(fmtD, "%x", NSDATETIME_FORMAT_BUFFER_LEN);
break;