npm.io
1.0.0 • Published 10 years ago

@micro-js/clone-date

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

clone-date

Build status Git tag NPM version Code style

Clone a date object

Installation

$ npm install @f/clone-date

Usage

var cloneDate = require('@f/clone-date')
var date = new Date()
var newDate = cloneDate(date)

date.getTime() === newDate.getTime()
date !== newDate

API

cloneDate(date)
  • date - The date object to be cloned

Returns: A new date object with the same timestamp as date

License

MIT