0.0.1 • Published 7 years ago
@victorouse/due-date-calculator v0.0.1
Due Date Calculator
Installation
This module can be installed via npm by running:
npm install @victorouse/due-date-calculator
Usage
const dueDate = require('@victorouse/due-date-calculator');
const submitDate = new Date('Monday 10 April, 2017 9:00:00');
const turnAroundTime = 1;
const dueDate = dueDateCalculator(submitDate, turnAroundTime); // returns a Date object
console.log(dueDate.toString()); // prints 'Mon Apr 10 2017 10:00:00'
Documentation
calculateDueDate(submitDate, turnAroundTime) ⇒ Date
Calculates the due date given the submission date and expected turn around time.
Kind: global function
Returns: Date - Due date of the task.
Param | Type | Description |
---|---|---|
submitDate | Date | The date of submission. |
turnAroundTime | number | The turn around time in hours. |
A link to the full documentation can be found here.
Commands
npm run clean
- Removedist/
directorynpm test
- Run testsnpm test:watch
- Run tests with watch option (watches files from./src/**/*.js
)npm run test:cover
- Runs coverage via nyc/istanbulnpm run cover:publish
- Publishes coverage report to coveralls.ionpm run lint
- Lint files using airbnb-confignpm run build
- Transpiles ES6 to ES5 and places result in./dist
npm run prepublish
- Hook for npm. Runs tests, lints, and publishes the coverage report.
0.0.1
7 years ago