git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15538 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-01-07 15:26:42 +00:00
parent 50139c4bc0
commit abfcff669d
2 changed files with 20 additions and 13 deletions

View file

@ -104,7 +104,7 @@
@end
#ifndef NO_GNUSTEP
@interface NSCalendarDate (GregorianDate)
- (int) lastDayOfGregorianMonth: (int)month year: (int)year;
@ -116,6 +116,15 @@
@end
void
GSBreakTime(NSTimeInterval when, int *year, int *month, int *day, int *hour,
int *minute, int *second, int *mil);
NSTimeInterval
GSTime(int day, int month, int year, int hour, int minute, int second, int mil);
#endif
#ifndef STRICT_MACOS_X
@interface NSCalendarDate (OPENSTEP)
- (NSCalendarDate*) dateByAddingYears: (int)years
@ -133,13 +142,6 @@
seconds: (int*)seconds
sinceDate: (NSDate*)date;
@end
#ifndef NO_GNUSTEP
void
GSBreakTime(NSTimeInterval when, int *year, int *month, int *day, int *hour,
int *minute, int *second, int *mil);
NSTimeInterval
GSTime(int day, int month, int year, int hour, int minute, int second, int mil);
#endif
#endif /* __NSCalendarDate_h_GNUSTEP_BASE_INCLUDE*/

View file

@ -1516,7 +1516,10 @@ static inline int getDigits(const char *from, char *to, int limit)
seconds: second];
}
// Getting String Descriptions of Dates
/**
* Calls -descriptionWithCalendarFormat:locale: passing the receviers
* calendar format and a nil locale.
*/
- (NSString*) description
{
return [self descriptionWithCalendarFormat: _calendar_format locale: nil];
@ -1932,14 +1935,13 @@ static inline int getDigits(const char *from, char *to, int limit)
@end
//
// Routines for manipulating Gregorian dates
//
/**
* Routines for manipulating Gregorian dates
*/
// The following code is based upon the source code in
// ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
// Software---Practice & Experience, vol. 20, no. 9 (September, 1990),
// pp. 899--928.
//
@implementation NSCalendarDate (GregorianDate)
@ -1984,6 +1986,9 @@ static inline int getDigits(const char *from, char *to, int limit)
@end
/**
* Methods present in OpenStep but later removed from MacOS-X
*/
@implementation NSCalendarDate (OPENSTEP)
/**