npm.io
15.5.3 • Published 5 years ago

@the-/date

Licence
MIT
Version
15.5.3
Deps
4
Size
242 kB
Vulns
0
Weekly
0
Stars
5

@the-/date

npm Version

Date utility for the-framework

Installation

$ npm install @the-/date --save

Usage

'use strict'

const theDate = require('@the-/date')

async function tryExample() {
  console.log(theDate().addHours(3).toDate()) // 3 hours later

  const date = theDate('2016/10/10', { lang: 'ja' })
  console.log(date.format('lll')) // -> "2016年10月10日 00:00"
}

tryExample().catch((err) => console.error(err))

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Keywords