Implemented add/substract methods

sure !

On Fri, Dec 12, 2014 at 4:15 PM, Vadim Ogievetsky <notifications@github.com>
wrote:
>
> In test/time_range.mocha.ts
> <https://github.com/metamx/chronology/pull/3#discussion-diff-21782313>:
>
> > +    });
> > +  });
> > +
> > +  describe("substract", () => {
> > +    it("works", () => {
> > +      var timeRangeJS = {
> > +        start: "FLOOR_DAY($now)",
> > +        end: "CEIL_DAY($now)"
> > +      };
> > +      var timeRange = TimeRange.fromJS(timeRangeJS);
> > +      var duration = Duration.fromJS("P1D");
> > +
> > +      expect(timeRange.substract(duration, Timezone.UTC()).toJS()).to.eql({
> > +        start: "FLOOR_DAY($now)-P1D",
> > +        end: "CEIL_DAY($now)-P1D"
> > +      })
>
> Please add test with this as the test data:
>
> var timeRangeJS = {
>   duration: "P2D",
>   end: "CEIL_DAY($now)"
> };
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/metamx/chronology/pull/3/files#r21782313>.
>