Fix problem with view widget relativedate format

Fixes #319
print-window-tiddler
Jermolene 2013-12-30 13:08:48 +00:00
rodzic 6d6e8afb9c
commit d043bdd289
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -158,8 +158,8 @@ ViewWidget.prototype.getValueAsDate = function(format) {
};
ViewWidget.prototype.getValueAsRelativeDate = function(format) {
var value = this.getValue();
if(value) {
var value = $tw.utils.parseDate(this.getValue());
if(value && $tw.utils.isDate(value) && value.toString() !== "Invalid Date") {
return $tw.utils.getRelativeDate((new Date()) - (new Date(value))).description;
} else {
return "";