]> source.dussan.org Git - jquery.git/commitdiff
Format @DATE to ISO 8601 format. Fixes #12725, Closes gh-957
authorBen Truyman <bentruyman@gmail.com>
Mon, 15 Oct 2012 15:45:00 +0000 (11:45 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Mon, 15 Oct 2012 15:49:56 +0000 (11:49 -0400)
grunt.js

index 70350ecd3929129095424f58a7ac0869f688f3b2..418eb5c766a9d2f5bb9d56f9d4567507ce52f12d 100644 (file)
--- 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 );