mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Format @DATE to ISO 8601 format. Fixes #12725, Closes gh-957
This commit is contained in:
parent
d01253e201
commit
96492b1d44
15
grunt.js
15
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 );
|
||||
|
Loading…
Reference in New Issue
Block a user