Permalink
Browse files

added hash method to SC.DateTime

  • Loading branch information...
1 parent 516a8df commit dbf8b5776e336e6d3965ce874477d417ee5286ab @erichocean erichocean committed Jun 7, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 foundation/system/date_time.js
View
8 foundation/system/date_time.js
@@ -388,6 +388,12 @@ SC.DateTime = SC.Object.extend(SC.Freezable, SC.Copyable,
return this;
},
+ hash: function() {
+ var hash = this._sc_hash;
+ if (!hash) hash = this._sc_hash = '%' + this.get('milliseconds');
+ return hash;
+ },
+
/**
Returns a copy of the receiver with the timezone set to the passed
timezone. The returned value is equal to the receiver (ie SC.Compare
@@ -884,7 +890,7 @@ SC.DateTime.mixin(SC.Comparable,
});
}
},
-
+
/** @private
Calls the create() method with the current internal _date value.

0 comments on commit dbf8b57

Please sign in to comment.