Nihilist Postmodern Mistake

    revent

    0.0.1 • Public • Published

    REvent

    Description

    An utility lib to convert a list of consecutive dates to events

    Usage

    var revent = require('revent').REvent; // in Node.js
    // .., in the browser copy directly the revent.js and use `revent( dateSequence ).toEvents()` 
     
    var dateSequence = [
      new Date("1990-11-30"), new Date("1990-12-1"), new Date("1990-12-2"),
      new Date("1990-12-4"),
      new Date("1990-12-7")
    ]
     
    var events = JSON.stringify( revent(dateSequence).toEvents() );
    console.log(events);
     
    /*
    [
      {date_start: new Date("1990-11-30"), date_end: new Date("1990-12-2")},
      {date_start: new Date("1990-12-4"), date_end: new Date("1990-12-4")},
      {date_start: new Date("1990-12-7"), date_end: new Date("1990-12-7")}
    ]
    */
     
     
     

    Installation

    $ npm install revent
    

    Run the tests

    ✱  mocha --ignore-leaks
     
      ․․․․․
     
      ✔ 5 tests complete (12ms)

    Keywords

    none

    Install

    npm i revent

    DownloadsWeekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • grigio