Skip to content

Instantly share code, notes, and snippets.

@hurjas
hurjas / timestamp.js
Created May 11, 2012 15:35 — forked from jonkemp/timestamp.js
Print out a nicely formatted timestamp in JavaScript.
/**
* Return a timestamp with the format "m/d/yy h:MM:ss TT"
* @type {Date}
*/
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, day and time