mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Implement hash for NSDate and subclasses to return time interval since reference date (coerced to unsigned int).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19394 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
87e2d7ff6c
commit
8b46caf9ad
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-05-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDate.m: Implement -hash for abstract class and for the
|
||||
concrete subclasses as suggested by Marcus Muller.
|
||||
|
||||
2004-05-21 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Tools/gdomap.c (xgethostnames): New function
|
||||
|
|
|
@ -1323,6 +1323,11 @@ GSTimeNow(void)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
{
|
||||
return (unsigned)[self timeIntervalSinceReferenceDate];
|
||||
}
|
||||
|
||||
- (BOOL) isEqual: (id)other
|
||||
{
|
||||
if (other == nil)
|
||||
|
@ -1453,6 +1458,11 @@ GSTimeNow(void)
|
|||
return self;
|
||||
}
|
||||
|
||||
- (unsigned) hash
|
||||
{
|
||||
return (unsigned)_seconds_since_ref;
|
||||
}
|
||||
|
||||
- (BOOL) isEqual: (id)other
|
||||
{
|
||||
if (other == nil)
|
||||
|
|
Loading…
Reference in a new issue