From: Ben Truyman Date: Mon, 15 Oct 2012 15:45:00 +0000 (-0400) Subject: Format @DATE to ISO 8601 format. Fixes #12725, Closes gh-957 X-Git-Tag: 1.9.0b1~226 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=96492b1d44a0c6154e6f98ec57808e6b5f4aaa09;p=jquery.git Format @DATE to ISO 8601 format. Fixes #12725, Closes gh-957 --- diff --git a/grunt.js b/grunt.js index 70350ecd3..418eb5c76 100644 --- a/grunt.js +++ b/grunt.js @@ -365,10 +365,19 @@ module.exports = function( grunt ) { } }); - // Embed Date // Embed Version - compiled = compiled.replace( "@DATE", new Date() ) - .replace( /@VERSION/g, version ); + // Embed Date + compiled = compiled.replace( /@VERSION/g, version ) + .replace( "@DATE", function () { + var date = new Date(); + + // YYYY-MM-DD + return [ + date.getFullYear(), + date.getMonth() + 1, + date.getDate() + ].join( "-" ); + }); // Write concatenated source to file file.write( name, compiled );