Permalink
Browse files

Plugins / Methods / Date.js - added ability to get a date in "long mo…

…nth name" in the asString method...

git-svn-id: http://jqueryjs.googlecode.com/svn/trunk/plugins/methods@6166 c715fcbe-d12f-0410-84c4-316a508785bb
  • Loading branch information...
1 parent 051c99c commit d47e6a5e4e43a4dc5a52fe699c860f84a0e94459 kelvinluck committed Jan 25, 2009
Showing with 3 additions and 2 deletions.
  1. +3 −2 date.js
View
@@ -406,11 +406,12 @@ Date.fullYearStart = '20';
* @cat Plugins/Methods/Date
* @author Kelvin Luck
*/
- add("asString", function() {
- var r = Date.format;
+ add("asString", function(format) {
+ var r = format || Date.format;
return r
.split('yyyy').join(this.getFullYear())
.split('yy').join((this.getFullYear() + '').substring(2))
+ .split('mmmm').join(this.getMonthName(false))
.split('mmm').join(this.getMonthName(true))
.split('mm').join(_zeroPad(this.getMonth()+1))
.split('dd').join(_zeroPad(this.getDate()));

0 comments on commit d47e6a5

Please sign in to comment.