DayWithinYear.js 286 B

1234567891011
  1. 'use strict';
  2. var Day = require('./Day');
  3. var DayFromYear = require('./DayFromYear');
  4. var YearFromTime = require('./YearFromTime');
  5. // https://262.ecma-international.org/5.1/#sec-15.9.1.4
  6. module.exports = function DayWithinYear(t) {
  7. return Day(t) - DayFromYear(YearFromTime(t));
  8. };