added ami's code

you can use the native date object