Coder Social home page Coder Social logo

relative.time.parser's People

Contributors

cmaurer avatar dependabot[bot] avatar localstatic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pjz

relative.time.parser's Issues

Support for values relative to arbitrary date/time

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')

Security vulnerability through npm-check-updates

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

Parse slightly more general relative times?

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.