gigasecond.js

1
2
3
4
5
6
7
8
9
10
11
12
// The date arithmetic here uses milliseconds, so this is one petamillisecond ;)
var ONE_GIGASECOND = Math.pow(10, 12);

var Gigasecond = function(startDate) {
  var anniversary = new Date(startDate.getTime() + ONE_GIGASECOND);

  this.date = function() {
    return anniversary;
  };
};

module.exports = Gigasecond;

Comments


You're not logged in right now. Please login via GitHub to comment