Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mirek/node-moment-human
Human readable date input parser support for momentjs, ie: "3 hours ago", "in 1yr and 3 secs", etc.
https://github.com/mirek/node-moment-human
Last synced: about 1 month ago
JSON representation
Human readable date input parser support for momentjs, ie: "3 hours ago", "in 1yr and 3 secs", etc.
- Host: GitHub
- URL: https://github.com/mirek/node-moment-human
- Owner: mirek
- Created: 2014-08-08T02:41:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-08T02:51:19.000Z (over 10 years ago)
- Last Synced: 2024-05-09T16:18:13.469Z (8 months ago)
- Language: CoffeeScript
- Size: 125 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Summary
Support for human readable date and duration parsing for momentjs, ie:
- `1 day ago` -> date, relative to passed now value or implicit current date.
- `1 year` -> duration
- ...## Installation
npm install moment-human --save
## Usage
momentHuman = require 'moment-human'
console.log momentHuman.parse '1 day ago'(this will change to standard momentjs plugin)