Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Convert natural language intervals into seconds.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.npmignore
README.md
package.json

README.md

node-interval-nl

A package for converting natural language intervals (e.g "1 week 10 seconds ago") into seconds. Similar to the SQL keyword INTERVAL.

Ago

Appending ago to an interval will negate it.

Example

> var interval = require("interval-nl");
> interval("1 week 10 seconds ago");
-604810
Something went wrong with that request. Please try again.