988592c823043ca97bab2401b704f1b6746ae8ebf67f9e00c413779719d8fc456199b25b78b5749c4603c368e67777cf3563c5a1515360d14675a638bc3e1d 301 B

123456789101112131415161718
  1. 'use strict';
  2. var modulo = require('./modulo');
  3. // https://262.ecma-international.org/5.1/#sec-15.9.1.3
  4. module.exports = function DaysInYear(y) {
  5. if (modulo(y, 4) !== 0) {
  6. return 365;
  7. }
  8. if (modulo(y, 100) !== 0) {
  9. return 366;
  10. }
  11. if (modulo(y, 400) !== 0) {
  12. return 365;
  13. }
  14. return 366;
  15. };