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

Spell out time duration from an input of seconds in an English language sentence

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

english-duration

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

englishDuration(3602)   // returns '1 hour and 2 seconds'
englishDuration(894492160)  // returns '28 years, 132 days, 22 hours, 2 minutes and 40 seconds'

FAQs

Package last updated on 05 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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