var is_holiday = (is_variable_date_holiday || is_fixed_date_holiday || is_nth_day_of_month_holiday)
And... it doesn't work as expected. Apparently the handling of boolean type data is somehow going insane. My final solution:
var is_holiday = false;
var holiday_name = '';
if (is_fixed_date_holiday == true)
{
is_holiday = true;
holiday_name = fixed_date_holiday_name;
};
if (is_variable_date_holiday == true)
{
is_holiday = true;
holiday_name = variable_holiday_name;
};
if (is_nth_day_of_month_holiday == true)
{
is_holiday = true;
holiday_name = nth_day_holiday_name;
};
var is_working_day = (is_weekend == true || is_holiday == true) ? false : true;
Yes. It really is that ugly.
0 comments:
Post a Comment