aboutsummaryrefslogtreecommitdiffstats
path: root/grunt.js
diff options
context:
space:
mode:
authorBen Truyman <bentruyman@gmail.com>2012-10-15 11:45:00 -0400
committerRick Waldron <waldron.rick@gmail.com>2012-10-15 11:49:56 -0400
commit96492b1d44a0c6154e6f98ec57808e6b5f4aaa09 (patch)
treee38168591c838b144504a9094c32551cb80f5611 /grunt.js
parentd01253e20158f53c08aa6bc0c1cf66806cd19148 (diff)
downloadjquery-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.js15
1 files changed, 12 insertions, 3 deletions
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 );