<script type="text/javascript">
var date = new Date();//Thu Jul 26 2012 15:59:09 GMT+0400 ..
var mon = ('0'+(1+date.getMonth())).replace(/.?(\d{2})/,'$1')
var a=date.toString().replace(/^[^\s]+\s([^\s]+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s.*$/ig,'$3-'+mon+'-$2 $4')
alert(a)
</script>