in reply to displaying the current date
... return sprintf "%04d-%02d-%02d", $year+1900,$month+1,$mday [download]