Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better ordering of replacements so single character format string don…

…'t get applied to replacements
  • Loading branch information...
commit da6f738554abf42c77b7bb061918bed5880b09da 1 parent 85589d5
@ronw23 ronw23 authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 date.js
View
6 date.js
@@ -410,14 +410,14 @@ Date.fullYearStart = '20';
add("asString", function(format) {
var r = format || Date.format;
return r
- .split('D').join(this.getDayName(true))
- .split('d').join(this.getDate())
.split('yyyy').join(this.getFullYear())
.split('yy').join((this.getFullYear() + '').substring(2))
+ .split('d').join(this.getDate())
+ .split('DD').join(this.getDayName(false))
+ .split('D').join(this.getDayName(true))
.split('mmmm').join(this.getMonthName(false))
.split('mmm').join(this.getMonthName(true))
.split('mm').join(_zeroPad(this.getMonth()+1))
- .split('DD').join(this.getDayName(false))
.split('dd').join(_zeroPad(this.getDate()))
.split('hh').join(_zeroPad(this.getHours()))
.split('min').join(_zeroPad(this.getMinutes()))
Please sign in to comment.
Something went wrong with that request. Please try again.