diff options
author | 2020-11-16 00:10:28 +0100 | |
---|---|---|
committer | 2020-11-16 00:10:28 +0100 | |
commit | e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d (patch) | |
tree | 55713f725f77b44ebfec86e4eec3ce33e71458ca /node_modules/es-abstract/2019/DayFromYear.js | |
download | website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.gz website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.tar.bz2 website_creator-e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d.zip |
api, login, auth
Diffstat (limited to 'node_modules/es-abstract/2019/DayFromYear.js')
-rw-r--r-- | node_modules/es-abstract/2019/DayFromYear.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/node_modules/es-abstract/2019/DayFromYear.js b/node_modules/es-abstract/2019/DayFromYear.js new file mode 100644 index 0000000..08dd5af --- /dev/null +++ b/node_modules/es-abstract/2019/DayFromYear.js @@ -0,0 +1,12 @@ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic'); + +var $floor = GetIntrinsic('%Math.floor%'); + +// https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3 + +module.exports = function DayFromYear(y) { + return (365 * (y - 1970)) + $floor((y - 1969) / 4) - $floor((y - 1901) / 100) + $floor((y - 1601) / 400); +}; + |