# time-text

> Time duration variables with a descriptive naming

Latest version **0.2.1** (published 2023-07-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install time-text
pnpm add time-text
yarn add time-text
bun add time-text
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2023-07-05 |
| First published | 2023-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Deltaaaaq |
| Maintainers | deltaaaaq |
| Keywords | time, time-duration, string |

## Links

- npm: https://www.npmjs.com/package/time-text
- Repository: https://github.com/CarlosViller/time-text
- Homepage: https://github.com/CarlosViller/time-text#readme
- Issues: https://github.com/CarlosViller/time-text/issues
- npm.io page: https://npm.io/package/time-text

## 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.2.1 (latest) — 2023-07-05
- 0.2.0 — 2023-07-05
- 0.1.1 — 2023-07-05
- 0.1.0 — 2023-07-05

## README

# Time text

## Overview
__time-text__ provides a set of numeric time duration variables in seconds, each with a descriptive name. It simplifies working with time durations by offering pre-defined constants for commonly used intervals.

### Default Time Durations
You can utilize default time duration variables, such as:
- `ONE_MINUTE`
- `FIVE_MINUTES`
- `FIFTEEN_MINUTES`
- `THIRTY_MINUTES`
- `FORTYFIVE_MINUTES`
- `ONE_HOUR`
- `FIVE_HOURS`
- `TWELVE_HOURS`
- `ONE_DAY`
- `FIFTEEN_DAYS`
- `ONE_WEEK`
- `ONE_MONTH`
- `ONE_YEAR`

### Custom Time Durations
Additionally, you have the flexibility to create custom time durations by specifying values in minutes, hours, days, months, or years using the `customTime` function.

```javascript
import { customTime } from "time-text";

const HALF_WEEK = customTime(0.5, "WEEK");

console.log(HALF_WEEK); // 302,400

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