Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

english-duration

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

english-duration - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "english-duration",
"version": "1.0.0",
"version": "1.0.1",
"description": "Spell out time duration from an input of seconds in an English language sentence",

@@ -5,0 +5,0 @@ "main": "index.js",

# english-duration
Spell out time duration from an input of seconds in an English language sentence
## Description
Spell out a time duration from a given input of seconds, in an English language sentence
## Usage
Pass any (positive) number of seconds to get string describing the given time duration in English language. Number values will be returned as integers, not words. As this helper does not work with dates, no values indicating months will be returned.
Basic examples
```js
englishDuration(3602) // returns '1 hour and 2 seconds'
englishDuration(894492160) // returns '28 years, 132 days, 22 hours, 2 minutes and 40 seconds'
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc