andrew4582

function zulu_date

Dec 16th, 2010
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function zulu_date(c) {
  2.     var b = new Date(c),
  3.         a = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
  4.     return b.getDate() + " " + a[b.getUTCMonth()] + " " + String(b.getUTCFullYear()).slice(-2) + " " + ("00" + b.getUTCHours()).slice(-2) + ":" + ("00" + b.getUTCMinutes()).slice(-2) + "Z"
  5. };
Advertisement
Add Comment
Please, Sign In to add comment