1.0.2 • Published 11 months ago

duration-translation v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

duration-translation

npm version

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:

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.

License

This package is open source and available under the MIT License.

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago