Skip to content

Instantly share code, notes, and snippets.

View LensHunnel's full-sized avatar

Lens Hunnel LensHunnel

View GitHub Profile
@LensHunnel
LensHunnel / moment.workdays.js
Created April 26, 2017 07:56 — forked from ioleo/moment.workdays.js
introduce 'workdays' mode to moment.js add/subtract methods (PL national holidays)
(function (undefined) {
/**
* moment.easter
* Source: https://github.com/zaygraveyard/moment-easter
* License: MIT
*/
moment.easter = function Easter20ops(year) {
var a = (year / 100 | 0) * 1483 - (year / 400 | 0) * 2225 + 2613;
var b = ((year % 19 * 3510 + (a / 25 | 0) * 319) / 330 | 0) % 29;
var c = 148 - b - ((year * 5 / 4 | 0) + a - b) % 7;