source: imaps-frontend/node_modules/es-abstract/2016/DaysInYear.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 301 bytes
RevLine 
[d565449]1'use strict';
2
3var modulo = require('./modulo');
4
5// https://262.ecma-international.org/5.1/#sec-15.9.1.3
6
7module.exports = function DaysInYear(y) {
8 if (modulo(y, 4) !== 0) {
9 return 365;
10 }
11 if (modulo(y, 100) !== 0) {
12 return 366;
13 }
14 if (modulo(y, 400) !== 0) {
15 return 365;
16 }
17 return 366;
18};
Note: See TracBrowser for help on using the repository browser.