Skip to main content
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

This is a follow-up question to original Prorated Refund CalculatorProrated Refund Calculator. Here is the summary of the changes I made since last, thanks to the good answers and some study of my own.

This is a follow-up question to original Prorated Refund Calculator. Here is the summary of the changes I made since last, thanks to the good answers and some study of my own.

This is a follow-up question to original Prorated Refund Calculator. Here is the summary of the changes I made since last, thanks to the good answers and some study of my own.

Improved grammar
Source Link
Quill
  • 12.1k
  • 5
  • 41
  • 94
  • Did away with bleeding-edge ECMAScript 6 code that was causing compatibility issues with some browsers.
  • Added more input validation;validation.
  • Added a utility function to format dates to MM/DD/YYYY format;format.
  • Input values are now obtained using getElementById instead of getting them from a numbered list;list.
  • Output is appended into the existing page, rather than updating placeholder HTML tags;tags.
  • Documentation throughout;throughout.
  • Output is more comprehensive and user-friendly.
  • Did away with bleeding-edge ECMAScript 6 code that was causing compatibility issues with some browsers.
  • Added more input validation;
  • Added a utility function to format dates to MM/DD/YYYY format;
  • Input values are now obtained using getElementById instead of getting them from a numbered list;
  • Output is appended into the existing page, rather than updating placeholder HTML tags;
  • Documentation throughout;
  • Output is more comprehensive and user-friendly.
  • Did away with bleeding-edge ECMAScript 6 code that was causing compatibility issues with some browsers.
  • Added more input validation.
  • Added a utility function to format dates to MM/DD/YYYY format.
  • Input values are now obtained using getElementById instead of getting them from a numbered list.
  • Output is appended into the existing page, rather than updating placeholder HTML tags.
  • Documentation throughout.
  • Output is more comprehensive and user-friendly.
Add sample input
Source Link
Phrancis
  • 20.5k
  • 6
  • 70
  • 155

SamplesSample input:

Product Purchase date: 6/1/2013
Contract Purchase date: 1/15/2014
Purchase Price: 699
Term (in years): 10
Cancel date: 07/13/2015
Paid in claims: 147
Grace period: 60

Resulting output:

Samples output:

Sample input:

Product Purchase date: 6/1/2013
Contract Purchase date: 1/15/2014
Purchase Price: 699
Term (in years): 10
Cancel date: 07/13/2015
Paid in claims: 147
Grace period: 60

Resulting output:

Source Link
Phrancis
  • 20.5k
  • 6
  • 70
  • 155
Loading