You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
479 B
19 lines
479 B
12 years ago
|
"use strict";
|
||
|
define(
|
||
|
[
|
||
|
'sugar'
|
||
|
], {
|
||
|
register: function (handlebars) {
|
||
|
handlebars.registerHelper("ShortDate", function (input) {
|
||
|
if (!input) {
|
||
|
return '';
|
||
|
}
|
||
|
|
||
|
var date = Date.create(input);
|
||
|
var result = '<span title="' + date.full() + '">' + date.short() + '</span>';
|
||
|
|
||
|
return new handlebars.SafeString(result);
|
||
|
});
|
||
|
}
|
||
|
});
|