diff options
author | Ben Truyman <bentruyman@gmail.com> | 2012-10-15 11:45:00 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-10-15 11:49:56 -0400 |
commit | 96492b1d44a0c6154e6f98ec57808e6b5f4aaa09 (patch) | |
tree | e38168591c838b144504a9094c32551cb80f5611 /grunt.js | |
parent | d01253e20158f53c08aa6bc0c1cf66806cd19148 (diff) | |
download | jquery-96492b1d44a0c6154e6f98ec57808e6b5f4aaa09.tar.gz jquery-96492b1d44a0c6154e6f98ec57808e6b5f4aaa09.zip |
Format @DATE to ISO 8601 format. Fixes #12725, Closes gh-957
Diffstat (limited to 'grunt.js')
-rw-r--r-- | grunt.js | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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 ); |