An open API service indexing awesome lists of open source software.

https://github.com/fujiharuka/the-date

Date utility for the-framework
https://github.com/fujiharuka/the-date

Last synced: 4 months ago
JSON representation

Date utility for the-framework

Awesome Lists containing this project

README

        

the-date
==========

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/the-labo/the-date
[bd_travis_url]: http://travis-ci.org/the-labo/the-date
[bd_travis_shield_url]: http://img.shields.io/travis/the-labo/the-date.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/the-labo/the-date
[bd_travis_com_shield_url]: https://api.travis-ci.com/the-labo/the-date.svg?token=
[bd_license_url]: https://github.com/the-labo/the-date/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/the-labo/the-date
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/the-labo/the-date.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/the-labo/the-date.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/the-labo/the-date
[bd_gemnasium_shield_url]: https://gemnasium.com/the-labo/the-date.svg
[bd_npm_url]: http://www.npmjs.org/package/the-date
[bd_npm_shield_url]: http://img.shields.io/npm/v/the-date.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

Date utility for the-framework

Installation
-----

```bash
$ npm install the-date --save
```

Usage
---------

```javascript
'use strict'

const {hours, dateAfter, formatDate} = require('the-date')

async function tryExample () {

console.log(dateAfter(hours(3))) // 3 hours later

const d = new Date('2016/10/10')
console.log(formatDate(d, 'lll', {lang: 'ja'})) // -> "2016年10月10日 00:00"
}

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

```

+ [List of Timezones](./doc/helps/TimeZones.md)

API Guide
-----

+ [[email protected]](./doc/api/api.md)
+ [create(args)](./doc/api/api.md#the-date-function-create)
+ [TheDate](./doc/api/api.md#the-date-class)

License
-------
This software is released under the [MIT License](https://github.com/the-labo/the-date/blob/master/LICENSE).

Links
------

+ [THE Labo][t_h_e_labo_url]

[t_h_e_labo_url]: https://github.com/the-labo