Skip to content
Browse files

Fixes for date formatter.

  • Loading branch information...
1 parent 8f4148f commit ed6eec0d1a522bf6e0f8ec6f15f2b22105249586 @tonytomov committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/jquery.fmatter.js
View
5 js/jquery.fmatter.js
@@ -109,8 +109,8 @@
} else if(date.constructor === Date) {
timestamp = date;
} else {
- date = date.split(/[\\\/:_;.\t\T\s-]/);
- format = format.split(/[\\\/:_;.\t\T\s-]/);
+ date = date.split(/[\\\/:_;.,\t\T\s-]/);
+ format = format.split(/[\\\/:_;.,\t\T\s-]/);
// parsing for month names
for(k=0,hl=format.length;k<hl;k++){
if(format[k] == 'M') {
@@ -125,6 +125,7 @@
ts[format[k].toLowerCase()] = parseInt(date[k],10);
}
}
+ if(ts.f) { ts.m = ts.f; }
if( ts.m == 0 && ts.y==0 && ts.d == 0) {
return "&#160;" ;
}

0 comments on commit ed6eec0

Please sign in to comment.
Something went wrong with that request. Please try again.