A js date function like the date function in PHP