Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

A filter to add or subtract a value from a given date using the methods Add and Subtract #171

Merged
merged 9 commits into from
Sep 3, 2015

Conversation

nicholasruggeri
Copy link
Contributor

Pull request for issue #170.

@urish
Copy link
Owner

urish commented Sep 3, 2015

Looks good, thanks!

Can you please:

  1. Rename them to amAdd, amSubtract to keep it consistent with the other filters
  2. Add tests for them

Thanks!

@nicholasruggeri
Copy link
Contributor Author

Thank you @urish ;)
All done.

urish added a commit that referenced this pull request Sep 3, 2015
A filter to add or subtract a value from a given date using the methods Add and Subtract
@urish urish merged commit 39b5bf6 into urish:master Sep 3, 2015
@urish
Copy link
Owner

urish commented Sep 3, 2015

Thanks!

@urish
Copy link
Owner

urish commented Sep 3, 2015

p.s. I have improved the tests, they now explicitly state the expected result as you originally intended to do:

    it('should subtract 1 hour from date', function () {
        var date = new Date(2000, 1, 1, 0, 0, 0);
        expect(amSubtract(date, 1, 'hours').toString()).toMatch(/^Mon Jan 31 2000 23:00:00/);
    });

@urish
Copy link
Owner

urish commented Sep 5, 2015

Released as 0.10.3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants