how to count days between two date time ?
please see my codes bellow:
<script type="text/javascript">
// how to count days between two date time ?
var a= '2014-03-21 12:00:12';
var b = '2014-05-11 18:00:00';
function days_diff(a,b){
// .....
// ..... placeholder ....
// ..... placeholder ....
// ..... placeholder ....
// ..... placeholder ....
// ..... placeholder ....
// .....
// var days = days_a - days_b;
return days;
}
</script>