mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Calendar date tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17092 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2b6fccdf85
commit
9c93fb1aa6
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-07-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSCalendarDate: ([-initWithString:calendarFormat:]) default
|
||||
year to 0001 s the gregorian calendar does not go earlier.
|
||||
([-initWithYear:month:day:hour:minute:second:timeZone:]) don't
|
||||
override a previously set calendar format.
|
||||
|
||||
2003-07-01 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Headers/gnustep/base/GSObjCRuntime.h/m (GSPrintf),
|
||||
|
|
|
@ -588,7 +588,11 @@ static inline int getDigits(const char *from, char *to, int limit)
|
|||
else
|
||||
{
|
||||
int milliseconds = 0;
|
||||
int year = 0, month = 1, day = 1;
|
||||
/* Default to gregorian year one ... there is no year zero and
|
||||
* the algorithms we use look odd for earlier dates.
|
||||
*/
|
||||
int year = 1;
|
||||
int month = 1, day = 1;
|
||||
int hour = 0, min = 0, sec = 0;
|
||||
NSTimeZone *tz = nil;
|
||||
BOOL ampm = NO;
|
||||
|
@ -1274,7 +1278,10 @@ static inline int getDigits(const char *from, char *to, int limit)
|
|||
{
|
||||
_time_zone = RETAIN(aTimeZone);
|
||||
}
|
||||
_calendar_format = cformat;
|
||||
if (_calendar_format == nil)
|
||||
{
|
||||
_calendar_format = cformat;
|
||||
}
|
||||
_seconds_since_ref = s;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue