drudge / mongoose-timestamp

Adds createdAt and updatedAt date attributes that get auto-assigned to the most recent create/update timestamp
Other
308 stars 64 forks source link

Use ObjectId.getTimestamp #2

Closed chapel closed 11 years ago

chapel commented 11 years ago

Instead of parsing it out, why not use the code already there in the ObjectId prototype?

https://github.com/mongodb/js-bson/blob/master/lib/bson/objectid.js#L173

drudge commented 11 years ago

Thanks.