forked from harttle/liquidjs
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow date and term calculation in liquid (#6)
* added moment library * allow date and term calculation in liquid * refactor addDuration and subtractDates * return values directly * Fix duration in days calculation * add tests * Maintain consistency in naming decorators * use existing decorators to calculate date term calculation * spell check * remove functions that are not needed * WIP: tests updated * Co-authored-by: Madhav Bhagat <madhav89@gmail.com> tests for add duration and subrtract date * return duration instead of no of days * add default argument for getObjectValues function * handle from_date greater than to_date case * update tests for negative value of durationInDays * support for adding durartion and tests for the same * added tests for assign * throw error if either value or type is incorrcect in duration calculation. Co-authored-by: Sumanth Subbarao <sumanth@Sumanths-MacBook-Pro.local>
- Loading branch information
1 parent
dc59ece
commit bf20a09
Showing
3 changed files
with
128 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters