Skip to content
/ secondify Public

Convert time span specifiers like '1m' or '2d' to the number of seconds...

Notifications You must be signed in to change notification settings

gjke/secondify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Usage

  1. Clone this repository git clone https://github.com/gjke/secondify.git
  2. Make sure that the folder containing secondify is on your classpath
import secondify
secondify.parse('1d').minutes() # returns 1440
secondify.parse('120m').hours() # returns 2.0

The following time specifiers are supported:

  • s for seconds
  • m for minutes
  • h for hours
  • d for days
  • w for weeks
  • y for years

About

Convert time span specifiers like '1m' or '2d' to the number of seconds...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages