@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 649 B
JavaScript
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
import e from"./../assert/is-date-object.js";import r from"./../assert/is-integer.js";import t from"./../math/base/special/floor.js";var i=e,a=r.isPrimitive,o=t,s=52,n=53;function l(e){return(e+o(e/4)-o(e/100)+o(e/400))%7}function f(e){var r;if(arguments.length)if(i(e))r=e.getFullYear();else{if(!a(e))throw new TypeError("invalid argument. Must provide either an integer or a `Date` object. Value: `"+e+"`.");r=e}else r=(new Date).getFullYear();return 4===l(r)||3===l(r-1)?n:s}var u=f;export default u;
//# sourceMappingURL=iso-weeks-in-year.js.map