Skip to content

Latest commit

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

timespec

Parse time-like phrases into a javascript Date.

Inspired by the unix program [at] 1 which includes a 'timespec' for parsing time-like phrases into dates. This extends the original scope to include the past and various other changes. It's similar, but not exactly the same.

usage

timespec=require('timespec');varis_now=timespec.parse('now');varis_now_last_week=timespec.parse('last week');varis_noon_today=timespec.parse('noon');varis_noon_yesterday=timespec.parse('noon yesterday');varis_12_weeks_ago=timespec.parse('last 12 weeks');varis_12_weeks_from_now=timespec.parse('next 12 weeks');varis_2_hour_from_now=timespec.parse('now - 2 hours');

About

Parse time-like phrases into a javascript Date.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages