# duration-translation

> The Time Unit Translator is a lightweight npm package for translating time units with ease. Convert seconds, minutes, hours, days, and months into localized forms in any language. Customize translations and formatting effortlessly. Open source and user-fr

Latest version **1.0.2** (published 2023-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install duration-translation
pnpm add duration-translation
yarn add duration-translation
bun add duration-translation
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-06-28 |
| First published | 2023-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ItzAndriss |
| Maintainers | itzandriss |

## Links

- npm: https://www.npmjs.com/package/duration-translation
- Repository: https://github.com/ItzAndriss/duration-translation
- Homepage: https://github.com/ItzAndriss/duration-translation#readme
- Issues: https://github.com/ItzAndriss/duration-translation/issues
- npm.io page: https://npm.io/package/duration-translation

## Recent versions

- 1.0.2 (latest) — 2023-06-28
- 1.0.1 — 2023-06-05

## README

# duration-translation

[![npm version](https://badge.fury.io/js/duration-translation.svg)](https://www.npmjs.com/package/duration-translation)

The `duration-translation` package is a lightweight npm module that allows you to translate time durations into different languages. It provides a simple and flexible way to convert seconds, minutes, hours, days, months and years into their corresponding localized forms.

## Installation

Install the package using npm:


npm install duration-translation
Usage
Import the package into your project:

```javascript
const duration = require('duration-translation');

//Translate a duration to a specific language:
let translatedDuration = duration('1m', 'hu');
console.log(translatedDuration); // Output: '1 perc'
```
You can use the duration function to translate time durations into various languages. The first argument is the duration string (e.g., '1m' for 1 minute), and the second argument is the language code (e.g., 'hu' for Hungarian).

# Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](github.com/ItzAndriss/duration-translation/).

# License
This package is open source and available under the [MIT License](https://opensource.org/license/mit/).

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