siwi-datehelper

time formate for nodejs

Usage no npm install needed!

<script type="module">
  import siwiDatehelper from 'https://cdn.skypack.dev/siwi-datehelper';
</script>

README

node Build Status npm npm Github file size

siwi-datehelper

install

use npm

npm install siwi-datehelper

use yarn

yarn add siwi-datehelper

demo

const expect = require('chai').expect
const dateHelper = require('siwi-datehelper')
describe('index.js', () => {
    it('time', async () => {
        const t = await dateHelper.time()
        console.log(t);
        expect(t).to.be.an('number')
    });
    it('Format', async () => {
        const f = await dateHelper.date_format()
        console.log(f);
        expect(f).to.be.a('string')
    });
    it('friendly', async () => {
        const time = await dateHelper.time()
        const f = await dateHelper.friendly(time - 340000)
        console.log(f);
        expect(f).to.be.a('string')
    });
});