Skip to content
Permalink
Browse files

Format @Date to ISO 8601 format. Fixes #12725, Closes gh-957

  • Loading branch information...
bentruyman authored and rwaldron committed Oct 15, 2012
1 parent d01253e commit 96492b1d44a0c6154e6f98ec57808e6b5f4aaa09
Showing with 12 additions and 3 deletions.
  1. +12 −3 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 );

0 comments on commit 96492b1

Please sign in to comment.
You can’t perform that action at this time.