gf3/moment-range — pull request #20 by scotthovestadt (2013-07-11 18:10:34+00:00)
Title: Issue #19 - added ability to construct range with string & added tests for constructor.

I've added the ability to construct the DateRange with a string (or any object that moment() can parse). This means that DateRange.start and DateRange.end will now always be moment objects.

You may notice that I simply wrap the start and end in moment objects and don't check to see if they are already moments. This is on purpose -- it has the effect of cloning any moment objects, which means if they are modified by other code, the DateRange will be unaffected.

To ensure all works as expected, I've added tests for the constructor.

Lastly, I updated package.json moment to 1.5.0 and ensured all tests continue to pass. It was necessary to update because the tests use moment.isMoment, which is only available in the new version. The library doesn't require 1.5.0 and continues to be compatible with older versions.