# asatte

> Asatte is immutable date manipulation library for minimalist.

Latest version **0.0.3** (published 2022-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install asatte
pnpm add asatte
yarn add asatte
bun add asatte
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-12-21 |
| First published | 2022-12-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | koeda |
| Maintainers | coder-ka |
| Keywords | date, immutable, manipulation, asatte |

## Links

- npm: https://www.npmjs.com/package/asatte
- Repository: https://github.com/coder-ka/asatte
- Homepage: https://github.com/coder-ka/asatte#readme
- Issues: https://github.com/coder-ka/asatte/issues
- npm.io page: https://npm.io/package/asatte

## Dependencies (1)

- [just-curry-it](https://npm.io/package/just-curry-it.md) ^5.3.0

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2022-12-21
- 0.0.2 — 2022-12-21
- 0.0.1 — 2022-12-21

## README

# asatte

Asatte(Day after tomorrow in Japanese) is immutable date manipulation library for minimalist.

There is no syntax (e.g. "d" "y").

## Motivation

I love [Fecha](https://github.com/taylorhakes/fecha).

Fecha is the best date library ever for me but no manipulation provided.

Yes, you can do that with JavaScript `Date` Object.

```js
const today = new Date();
const dayAfterTomorrow = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 2, today.getHours(), today.getMinutes(), today.getSeconds(), today.getMilliseconds());
```

With asatte

```js
import { addD } from "asatte";

const today = new Date();
const dayAfterTomorrow = addD(2, today);
```

Which do you like?

# Installation

```bash
npm i asatte
```

# Functions

You can understand what function to use with these signatures.

addX:

- `addY(years: number, date: Date): Date`
- `addMo(months: number, date: Date): Date`
- `addD(dates: number, date: Date): Date`
- `addH(hours: number, date: Date): Date`
- `addMi(minutes: number, date: Date): Date`
- `addS(seconds: number, date: Date): Date`
- `addMS(milliseconds: number, date: Date): Date`

setX:

- `setY(years: number, date: Date): Date`
- `setMo(months: number, date: Date): Date`
- `setD(dates: number, date: Date): Date`
- `setH(hours: number, date: Date): Date`
- `setMi(minutes: number, date: Date): Date`
- `setS(seconds: number, date: Date): Date`
- `setMS(milliseconds: number, date: Date): Date`

And every function is curried!

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