https://github.com/jrop/moment-from-now
https://github.com/jrop/moment-from-now
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jrop/moment-from-now
- Owner: jrop
- Created: 2016-11-11T23:17:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-18T05:14:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-18T07:48:44.976Z (almost 2 years ago)
- Language: TypeScript
- Size: 36.1 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# moment-from-now
> An extremely small (<1kb minified) `.fromNow()` implementation.
## Installation
```sh
$ npm install --save moment-from-now
```
## Usage
```js
import fromNow from "moment-from-now";
fromNow(new Date().getTime() + 60 * 1000);
// => '1 minute'
```
## License
ISC License (ISC)
Copyright (c) 2016, Company or Person's Name
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.