$netAmount) return round(($amount*$taxRate) / 100, 2); else return 0; } function calTaxOnClick() { ?> 0 if date a< date b,date a== date b,date a > date b respectively. function compareDate($i_sFirstDate, $i_sSecondDate) { //Break the Date strings into seperate components $arrFirstDate = explode ("-", $i_sFirstDate); $arrSecondDate = explode ("-", $i_sSecondDate); $intFirstDay = $arrFirstDate[0]; $intFirstMonth = $arrFirstDate[1]; $intFirstYear = $arrFirstDate[2]; $intSecondDay = $arrSecondDate[0]; $intSecondMonth = $arrSecondDate[1]; $intSecondYear = $arrSecondDate[2]; // Calculate the diference of the two dates and return the number of days. $intDate1Jul = gregoriantojd($intFirstMonth, $intFirstDay, $intFirstYear); $intDate2Jul = gregoriantojd($intSecondMonth, $intSecondDay, $intSecondYear); return $intDate1Jul - $intDate2Jul; }//end Compare Date function calBankNoteAndCoin() { ?> $tday)?1:0; $byear_new = $tyear; $bmonth_new = $tmonth; $bmonth_new -= ($bday>$tday)?1:0; if($a_month < 0){ $a_month += 12; $a_year--; } if($tday >= $bday){ $a_day = $tday - $bday; }else{ $tmp_timestamp = mktime(0,0,0,$bmonth_new,1,$byear_new); $a_day = (date("t",$tmp_timestamp) - $bday)+ $tday; } $a_year += $mYear_adjust; return "$a_year"; //return "$a_year ,$a_month ,$a_day"; } ?>