cmaurer / relative.time.parser Goto Github PK
View Code? Open in Web Editor NEWMoment.js Plugin for parsing Relative Time Strings
License: MIT License
Moment.js Plugin for parsing Relative Time Strings
License: MIT License
Currently, results are always relative to the current date/time (i.e. moment()
), but it would also be very useful to be able to work with an arbitrary date/time value, e.g.
moment('2017-10-18T20:43:00Z').relativeTime('-3h')
Hi,
thanks for this great plugin. I'm using it for a HomeKit/homebridge plugin (my homebridge-calendar) and one of its users has reported a security vulnerability for it: It turns out that the source is a broken version of the debug module, which is imported through npm-check-updates. Please upgrade the dependencies of relative-time-parser and publish a new version.
See https://nodesecurity.io/advisories/534 for more details.
Thanks!
grover
Please move grunt
and grunt-cli
from main dependencies
to devDependencies
.
Graphite format is all well and good, but it would be nice if the module would also ignore spaces between the amount and the units in order to inch toward more NLP-like handling. "+2 years" isn't much different than "+2years", and it's literally a 3-character change to the regex (add \s*
between the number and the units).
isRelativeTimeFormat
should return true for "now"
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.