Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changing all "m/d/yyyy" formatted dates to default to the "yyyy-mm-dd…

…" ISO 8601 date format. Closes #78.
  • Loading branch information...
commit d0631e80071489dafdd0741f97594f63dc1eba22 1 parent 4a969a4
@cowboy authored
View
2  docs/api_template.md
@@ -53,7 +53,7 @@ grunt.template.date(date, format)
In this example, a specific date is formatted as month/day/year.
```javascript
-grunt.template.date(847602000000, 'mm/dd/yyyy') // '11/10/1996'
+grunt.template.date(847602000000, 'yyyy-mm-dd') // '1996-11-10'
```
### grunt.template.today
View
2  docs/task_concat.md
@@ -79,7 +79,7 @@ grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
- '<%= grunt.template.today("m/d/yyyy") %> */'
+ '<%= grunt.template.today("yyyy-mm-dd") %> */'
},
concat: {
dist: {
View
2  docs/task_min.md
@@ -127,7 +127,7 @@ grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
- '<%= grunt.template.today("m/d/yyyy") %> */'
+ '<%= grunt.template.today("yyyy-mm-dd") %> */'
},
min: {
dist: {
View
2  tasks/init/commonjs/root/grunt.js
@@ -5,7 +5,7 @@ module.exports = function(grunt) {
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
- '<%= grunt.template.today("m/d/yyyy") %>\n' +
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
View
4 tasks/init/gruntfile/root/grunt.js
@@ -6,13 +6,13 @@ module.exports = function(grunt) {
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
- '<%= grunt.template.today("m/d/yyyy") %>\n' +
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},{% } else { %}
meta: {
- banner: '/*! PROJECT_NAME - v0.1.0 - {%= grunt.template.today("m/d/yyyy") %}\n' +
+ banner: '/*! PROJECT_NAME - v0.1.0 - {%= grunt.template.today("yyyy-mm-dd") %}\n' +
'* Copyright (c) {%= grunt.template.today("yyyy") %} YOUR_NAME; Licensed MIT %> */'
},{% } } %}
lint: {
View
2  tasks/init/jquery/root/grunt.js
@@ -6,7 +6,7 @@ module.exports = function(grunt) {
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
- '<%= grunt.template.today("m/d/yyyy") %>\n' +
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
View
4 test/tasks/misc_test.js
@@ -74,8 +74,8 @@ exports['banner'] = function(test) {
config('test_config.banner', '<%= _.pluck(test_config.d, "a").join(", ") %>');
test.equal(grunt.helper('banner', 'test_config.banner'), utils.normalizelf('1, 2, 3\n'), 'It should join arrays.');
- config('test_config.banner', '<%= grunt.template.today("m/d/yyyy") %>');
- test.equal(grunt.helper('banner', 'test_config.banner'), utils.normalizelf(template.today('m/d/yyyy') + '\n'), 'It should parse the current date correctly.');
+ config('test_config.banner', '<%= grunt.template.today("yyyy-mm-dd") %>');
+ test.equal(grunt.helper('banner', 'test_config.banner'), utils.normalizelf(template.today('yyyy-mm-dd') + '\n'), 'It should parse the current date correctly.');
test.done();
};
Please sign in to comment.
Something went wrong with that request. Please try again.