0.0.1 • Published 7 years ago

@victorouse/due-date-calculator v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

Due Date Calculator

Coverage Status Build Status

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.

ParamTypeDescription
submitDateDateThe date of submission.
turnAroundTimenumberThe turn around time in hours.

A link to the full documentation can be found here.

Commands

  • npm run clean - Remove dist/ directory
  • npm test - Run tests
  • npm test:watch - Run tests with watch option (watches files from ./src/**/*.js)
  • npm run test:cover - Runs coverage via nyc/istanbul
  • npm run cover:publish - Publishes coverage report to coveralls.io
  • npm run lint - Lint files using airbnb-config
  • npm 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