This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @function explode() -- split a string into a list of strings | |
// {string} $string: the string to be split | |
// {string} $delimiter: the boundary string | |
// @return {list} the result list | |
@function explode($string, $delimiter) { | |
$result: (); | |
@if $delimiter == "" { | |
@for $i from 1 through str-length($string) { | |
$result: append($result, str-slice($string, $i, $i)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Calculates Easter in the Gregorian/Western (Catholic and Protestant) calendar | |
* based on the algorithm by Oudin (1940) from http://www.tondering.dk/claus/cal/easter.php | |
* @returns {array} [int month, int day] | |
*/ | |
function getEaster(year) { | |
var f = Math.floor, | |
// Golden Number - 1 | |
G = year % 19, | |
C = f(year / 100), |