Skip to content

Commit

Permalink
Round up coffees, add decimals to birth year dec
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedor Paretsky committed Sep 26, 2018
1 parent 121959c commit 2b696cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/js/decimalYears.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ $(document).ready(function () {
function calculateDecimalYear() {
var now = Date.now();
var decimalYears = (now - birthday) / 31556952000;
$('#years_old').html(decimalYears.toFixed(3));
$('#years_old').html(decimalYears.toFixed(5));

var coffees = 1100 + (3 * (now - coffeeDate) / 88643123.59550563);
$('#coffee_num').html(coffees.toFixed(3));
$('#coffee_num').html(Math.ceil(coffees.toFixed(3)));
}

0 comments on commit 2b696cb

Please sign in to comment.