Hey guys im trying to find some info regarding java and the calendar class. I need to write an if statement that says if it is a weekend i.e sat or sunday then do this else do this
Cheers
Thanks for the help however i don't think im implementing it correctly, nothing is being displayed now.
$(document).ready(function() {
function recalculate() {
var sum = 49;
int day = Calendar.getInstance().get( Calendar.DAY_OF_WEEK );
if ( day == Calendar.SATURDAY || day == Calendar.SUNDAY ){
sum = 80;
}
$("input[type=checkbox]:checked").each(function() {
sum = parseInt($(this).attr("rel"));
});
$("#output").html(sum);
}
$("input[type=checkbox]").change(function() {
recalculate();
});
});