|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
301 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var modulo = require('./modulo');
|
|---|
| 4 |
|
|---|
| 5 | // https://262.ecma-international.org/5.1/#sec-15.9.1.3
|
|---|
| 6 |
|
|---|
| 7 | module.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.