Skip to content

micro-js/timestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timestamp

Build status Git tag NPM version Code style

Get the current timestamp in milliseconds. Provides a more semantic and consistent interface than +new Date() and other weird js idioms.

Installation

$ npm install @f/timestamp

Usage

var timestamp = require('@f/timestamp')

timestamp() === new Date().getTime()
timestamp() === +new Date

API

timestamp()

Returns: The current timestamp in milliseconds.

License

MIT