0.0.1 • Published 10 years ago
samprati v0.0.1
samprati
Sane Module Praising Time; सम्प्रति == now
Just returning current date/time in human readable format.
Motivation
Simple. When one need just current time for logs, posts, edits or updates, with simple formatting options.
Installation
npm install samprati
Usage
var showTime = require('samprati')
console.log(showTime())Default output will be current date in ISO 8601 format and time in extended format. Everything is zero-padded and simple as brick:
2016-09-21 19:26:06.277
With optional string parameter:
var showTime = require('samprati')
console.log(showTime('${yy}${MM}${dd}${hh}${mm}${ss}.${ms}'))20160921192606.277
Some blog post string:
console.log('Date: ${dd}/${MM}/${yy} time: ${hh}:${mm}')Date: 21/09/2016 time: 19:26
Tests
npm test
Contributing
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
License
MIT
0.0.1
10 years ago