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
var ReasonSwitch = function(reasons) { | |
this.on = !!reasons.length; | |
this.reasons = reasons; //reasons | |
this.bias = 'off'; //implement later, are reasons to stay on or off | |
this.on = function(reason) { | |
var reasons = this.reasons; | |
var switched = false; //default |
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
<?php | |
function range_parse($date, $default_year) { | |
$get_month_num = function($month_name) { | |
$month_num = false; //default | |
for($i=1; $i <= 12; $i++) { | |
$month_start = mktime(12,0, 0, $i, 1); | |
$month_long = date('F', $month_start); | |
$month_short = date('M', $month_start); | |
$month_long = mb_strtolower($month_long); |