Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
</head>
<body>
</body>
</html>
 
function switchFormat(dateString) {
    var a = dateString.split('/'),
        b;
    b = a[0];
    a[0] = a[1];
    a[1] = b;
    return a.join('/');
}
console.log(switchFormat("08/07/2010 11:22:00 AM"));
var storArray=[], a;
var serverTimestamp = storArray[a][0];
var pieces = serverTimestamp.split('/'); 
storArray[a][0] = pieces[1] + '/' + pieces[0] + '/' + pieces[2];
var gmt = new Date(storArray[a][0]);
var localTime = gmt.getTime() - (gmt.getTimezoneOffset() * 60000); // convert gmt date to minutes
var localDate = new Date(localTime); // convert i
console.log(localDate);
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers