@the-/date

Date utility for the-framework

Usage no npm install needed!

<script type="module">
  import theDate from 'https://cdn.skypack.dev/@the-/date';
</script>

README

@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.

Links