# @the-/date

> Date utility for the-framework

Latest version **15.5.3** (published 2020-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @the-/date
pnpm add @the-/date
yarn add @the-/date
bun add @the-/date
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 15.5.3 |
| Published | 2020-12-01 |
| First published | 2019-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 4 |
| Unpacked size | 242.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | lib, the |

## Links

- npm: https://www.npmjs.com/package/@the-/date
- Repository: https://github.com/the-labo/the
- Homepage: https://github.com/the-labo/the/tree/master/packages/date#readme
- Issues: https://github.com/the-labo/the#issues
- npm.io page: https://npm.io/package/@the-/date

## Dependencies (4)

- [abind](https://npm.io/package/abind.md) ^1.0.5
- [moment](https://npm.io/package/moment.md) ^2.29.1
- [moment-timezone](https://npm.io/package/moment-timezone.md) ^0.5.31
- [@the-/util-array](https://npm.io/package/@the-/util-array.md) ^15.4.12

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 15.5.3 (latest) — 2020-12-01
- 15.5.2 — 2020-05-22
- 15.5.1 — 2020-02-22
- 15.5.0 — 2019-11-30
- 15.4.11 — 2019-10-20
- 15.4.2 — 2019-05-02
- 15.4.1 — 2019-04-30
- 15.2.1 — 2019-04-08
- 15.2.0 — 2019-03-31
- 15.1.4 — 2019-03-31
- 15.1.3 — 2019-03-30
- 15.1.2 — 2019-03-30
- 15.1.0 — 2019-03-29
- 15.0.3 — 2019-03-21
- 15.0.2 — 2019-03-21

## README

@the-/date
==========

<!---
This file is generated by @the-/templates. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![npm Version][bd_npm_shield_url]][bd_npm_url]

[bd_repo_url]: https://github.com/the-labo/the
[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

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Date utility for the-framework

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>




<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/readme/01.Installation.md.hbs" Start -->

<a name="section-doc-readme-01-installation-md"></a>

Installation
-----

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


<!-- Section from "doc/readme/01.Installation.md.hbs" End -->

<!-- Section from "doc/readme/02.Usage.md.hbs" Start -->

<a name="section-doc-readme-02-usage-md"></a>

Usage
---------

```javascript
'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))

```


<!-- Section from "doc/readme/02.Usage.md.hbs" End -->


<!-- Sections Start -->

<a name="api"></a>

## API Guide


- AddMixed
  - [#add(amount,unit)](./doc/api/api.md#AddMixed#add)
  - [#addDay(day)](./doc/api/api.md#AddMixed#addDay)
  - [#addDays(days)](./doc/api/api.md#AddMixed#addDays)
  - [#addHour(hour)](./doc/api/api.md#AddMixed#addHour)
  - [#addHours(hours)](./doc/api/api.md#AddMixed#addHours)
  - [#addMillisecond(millisecond)](./doc/api/api.md#AddMixed#addMillisecond)
  - [#addMilliseconds(milliseconds)](./doc/api/api.md#AddMixed#addMilliseconds)
  - [#addMinute(minute)](./doc/api/api.md#AddMixed#addMinute)
  - [#addMinutes(minutes)](./doc/api/api.md#AddMixed#addMinutes)
  - [#addMonth(month)](./doc/api/api.md#AddMixed#addMonth)
  - [#addMonths(months)](./doc/api/api.md#AddMixed#addMonths)
  - [#addQuarter(quarter)](./doc/api/api.md#AddMixed#addQuarter)
  - [#addQuarters(quarters)](./doc/api/api.md#AddMixed#addQuarters)
  - [#addSecond(second)](./doc/api/api.md#AddMixed#addSecond)
  - [#addSeconds(seconds)](./doc/api/api.md#AddMixed#addSeconds)
  - [#addWeek(week)](./doc/api/api.md#AddMixed#addWeek)
  - [#addWeeks(weeks)](./doc/api/api.md#AddMixed#addWeeks)
  - [#addYear(year)](./doc/api/api.md#AddMixed#addYear)
  - [#addYears(years)](./doc/api/api.md#AddMixed#addYears)
- EndOfMixed
  - [#endOf(unit)](./doc/api/api.md#EndOfMixed#endOf)
  - [#endOfDate()](./doc/api/api.md#EndOfMixed#endOfDate)
  - [#endOfDay()](./doc/api/api.md#EndOfMixed#endOfDay)
  - [#endOfHour()](./doc/api/api.md#EndOfMixed#endOfHour)
  - [#endOfIsoWeek()](./doc/api/api.md#EndOfMixed#endOfIsoWeek)
  - [#endOfMinute()](./doc/api/api.md#EndOfMixed#endOfMinute)
  - [#endOfMonth()](./doc/api/api.md#EndOfMixed#endOfMonth)
  - [#endOfQuarter()](./doc/api/api.md#EndOfMixed#endOfQuarter)
  - [#endOfSecond()](./doc/api/api.md#EndOfMixed#endOfSecond)
  - [#endOfWeek()](./doc/api/api.md#EndOfMixed#endOfWeek)
  - [#endOfYear()](./doc/api/api.md#EndOfMixed#endOfYear)
- GetMixed
  - [#get(unit)](./doc/api/api.md#GetMixed#get)
  - [#getDate()](./doc/api/api.md#GetMixed#getDate)
  - [#getHour()](./doc/api/api.md#GetMixed#getHour)
  - [#getMillisecond()](./doc/api/api.md#GetMixed#getMillisecond)
  - [#getMinute()](./doc/api/api.md#GetMixed#getMinute)
  - [#getMonth()](./doc/api/api.md#GetMixed#getMonth)
  - [#getSecond()](./doc/api/api.md#GetMixed#getSecond)
  - [#getYear()](./doc/api/api.md#GetMixed#getYear)
- module:@the-/date
  - [.create(args)](./doc/api/api.md#module_@the-/date.create)
  - [.default()](./doc/api/api.md#module_@the-/date.default)
  - [.Durations](./doc/api/api.md#module_@the-/date.Durations)
  - [.mixins](./doc/api/api.md#module_@the-/date.mixins)
  - [.TheDate](./doc/api/api.md#module_@the-/date.TheDate)
  - [.TheDateBase](./doc/api/api.md#module_@the-/date.TheDateBase)
  - [.units](./doc/api/api.md#module_@the-/date.units)
- module:@the-/date.mixins
  - [.addMix(Class)](./doc/api/api.md#module_@the-/date.mixins.addMix)
  - [.endOf(Class)](./doc/api/api.md#module_@the-/date.mixins.endOf)
  - [.getMix(Class)](./doc/api/api.md#module_@the-/date.mixins.getMix)
  - [.momentMix(Class)](./doc/api/api.md#module_@the-/date.mixins.momentMix)
  - [.setMix(Class)](./doc/api/api.md#module_@the-/date.mixins.setMix)
  - [.startOf(Class)](./doc/api/api.md#module_@the-/date.mixins.startOf)
  - [.subtractMix(Class)](./doc/api/api.md#module_@the-/date.mixins.subtractMix)
- module:@the-/date.mixins.addMix
  - [~AddMixed](./doc/api/api.md#module_@the-/date.mixins.addMix~AddMixed)
- module:@the-/date.mixins.endOf
  - [~EndOfMixed](./doc/api/api.md#module_@the-/date.mixins.endOf~EndOfMixed)
- module:@the-/date.mixins.getMix
  - [~GetMixed](./doc/api/api.md#module_@the-/date.mixins.getMix~GetMixed)
- module:@the-/date.mixins.momentMix
  - [~MomentMixed](./doc/api/api.md#module_@the-/date.mixins.momentMix~MomentMixed)
- module:@the-/date.mixins.setMix
  - [~SetMixed](./doc/api/api.md#module_@the-/date.mixins.setMix~SetMixed)
- module:@the-/date.mixins.startOfMix
  - [~StartOfMixed](./doc/api/api.md#module_@the-/date.mixins.startOfMix~StartOfMixed)
- module:@the-/date.mixins.subtractMix
  - [~SubtractMixed](./doc/api/api.md#module_@the-/date.mixins.subtractMix~SubtractMixed)
- MomentMixed
  - [#toMoment()](./doc/api/api.md#MomentMixed#toMoment)
- SetMixed
  - [#set(key,value)](./doc/api/api.md#SetMixed#set)
  - [#setDate(value)](./doc/api/api.md#SetMixed#setDate)
  - [#setHour(value)](./doc/api/api.md#SetMixed#setHour)
  - [#setMillisecond(value)](./doc/api/api.md#SetMixed#setMillisecond)
  - [#setMinute(value)](./doc/api/api.md#SetMixed#setMinute)
  - [#setMonth(value)](./doc/api/api.md#SetMixed#setMonth)
  - [#setSecond(value)](./doc/api/api.md#SetMixed#setSecond)
  - [#setYear(value)](./doc/api/api.md#SetMixed#setYear)
- StartOfMixed
  - [#startOf(unit)](./doc/api/api.md#StartOfMixed#startOf)
  - [#startOfDate()](./doc/api/api.md#StartOfMixed#startOfDate)
  - [#startOfDay()](./doc/api/api.md#StartOfMixed#startOfDay)
  - [#startOfHour()](./doc/api/api.md#StartOfMixed#startOfHour)
  - [#startOfIsoWeek()](./doc/api/api.md#StartOfMixed#startOfIsoWeek)
  - [#startOfMinute()](./doc/api/api.md#StartOfMixed#startOfMinute)
  - [#startOfMonth()](./doc/api/api.md#StartOfMixed#startOfMonth)
  - [#startOfQuarter()](./doc/api/api.md#StartOfMixed#startOfQuarter)
  - [#startOfSecond()](./doc/api/api.md#StartOfMixed#startOfSecond)
  - [#startOfWeek()](./doc/api/api.md#StartOfMixed#startOfWeek)
  - [#startOfYear()](./doc/api/api.md#StartOfMixed#startOfYear)
- SubtractMixed
  - [#subtract(amount,unit)](./doc/api/api.md#SubtractMixed#subtract)
  - [#subtractDay(day)](./doc/api/api.md#SubtractMixed#subtractDay)
  - [#subtractDays(days)](./doc/api/api.md#SubtractMixed#subtractDays)
  - [#subtractHour(hour)](./doc/api/api.md#SubtractMixed#subtractHour)
  - [#subtractHours(hours)](./doc/api/api.md#SubtractMixed#subtractHours)
  - [#subtractMillisecond(millisecond)](./doc/api/api.md#SubtractMixed#subtractMillisecond)
  - [#subtractMilliseconds(milliseconds)](./doc/api/api.md#SubtractMixed#subtractMilliseconds)
  - [#subtractMinute(minute)](./doc/api/api.md#SubtractMixed#subtractMinute)
  - [#subtractMinutes(minutes)](./doc/api/api.md#SubtractMixed#subtractMinutes)
  - [#subtractMonth(month)](./doc/api/api.md#SubtractMixed#subtractMonth)
  - [#subtractMonths(months)](./doc/api/api.md#SubtractMixed#subtractMonths)
  - [#subtractQuarter(quarter)](./doc/api/api.md#SubtractMixed#subtractQuarter)
  - [#subtractQuarters(quarters)](./doc/api/api.md#SubtractMixed#subtractQuarters)
  - [#subtractSecond(second)](./doc/api/api.md#SubtractMixed#subtractSecond)
  - [#subtractSeconds(seconds)](./doc/api/api.md#SubtractMixed#subtractSeconds)
  - [#subtractWeek(week)](./doc/api/api.md#SubtractMixed#subtractWeek)
  - [#subtractWeeks(weeks)](./doc/api/api.md#SubtractMixed#subtractWeeks)
  - [#subtractYear(year)](./doc/api/api.md#SubtractMixed#subtractYear)
  - [#subtractYears(years)](./doc/api/api.md#SubtractMixed#subtractYears)
- TheDate
  - [#format(format)](./doc/api/api.md#TheDate#format)
  - [#fromNow()](./doc/api/api.md#TheDate#fromNow)
  - [#toDate()](./doc/api/api.md#TheDate#toDate)
  - [#toJSON()](./doc/api/api.md#TheDate#toJSON)
  - [#toNumber()](./doc/api/api.md#TheDate#toNumber)
  - [#toString()](./doc/api/api.md#TheDate#toString)

See [API Guide](./doc/api/api.md) for more detail


<!-- LICENSE Start -->
<a name="license"></a>

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

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [THE Labo][the_labo_url]

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

<!-- Links End -->

---
_Source: https://npm.io/package/@the-/date · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
