Mofified scripts to get current date