Skip to content
Browse files

Edited dataTables.dateFormat.js via GitHub

  • Loading branch information...
1 parent 3a42eb8 commit 40694133d33828ab24ba0d1e440271b1e399ae26 @sedovsek committed Apr 18, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 dataTables.dateFormat.js
View
8 dataTables.dateFormat.js
@@ -1,4 +1,6 @@
function calculate_date(date) {
+ var date = date.replace(" ", "");
+
if (date.indexOf('.') > 0) {
/*date a, format dd.mn.(yyyy) ; (year is optional)*/
var eu_date = date.split('.');
@@ -9,19 +11,19 @@ function calculate_date(date) {
/*year (optional)*/
if (eu_date[2]) {
- var year = $.trim(eu_date[2]);
+ var year = eu_date[2];
} else {
var year = 0;
}
/*month*/
- var month = $.trim(eu_date[1]);
+ var month = eu_date[1];
if (month.length == 1) {
month = 0+month;
}
/*day*/
- var day = $.trim(eu_date[0]);
+ var day = eu_date[0];
if (day.length == 1) {
day = 0+day;
}

0 comments on commit 4069413

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