bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix: NSCalendarDate, descriptionWithCalendarFormat:locale:


From: Georg Fleischmann
Subject: Fix: NSCalendarDate, descriptionWithCalendarFormat:locale:
Date: Tue, 28 Aug 2001 20:20:08 +0200

Hi,

here is a little patch to make the millisec output of the description method 
work.

Georg


2001-08-28  Georg Fleischmann

        * base/Source/NSCalendarDate.m
        [NSCalendarDate descriptionWithCalendarFormat:locale:]:
        make milliseconds works (%F)


diff -u base/Source/NSCalendarDate.m.orig base/Source/NSCalendarDate.m


--- base/Source/NSCalendarDate.m.orig   Tue Aug 28 19:59:49 2001
+++ base/Source/NSCalendarDate.m        Tue Aug 28 20:06:43 2001
@@ -1334,10 +1334,10 @@
              s = ([self dayOfCommonEra] - GREGORIAN_REFERENCE) * 86400.0;
              s -= (_seconds_since_ref
                + [_time_zone secondsFromGMTForDate: self]);
-             s = abs(s);
+             s = fabs(s);
              s -= floor(s);
              ++i;
-             k = VSPRINTF_LENGTH(sprintf(&(buf[j]), "%03d", (int)s*1000));
+             k = VSPRINTF_LENGTH(sprintf(&(buf[j]), "%03d", (int)(s*1000)));
              j += k;
              break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]