Content deleted Content added
Needs gerrit:1149440 |
Overshot a bit |
||
(2 intermediate revisions by the same user not shown) | |||
Line 35:
* If a property is a function, it is called to retrieve the formatted
* timestamp string. The function must accept one argument, a `Date` object.
*
* If no `options` is specified, the timestamp adheres to the user’s date
* format and timezone preferences.
*/
outputFormats: {
Line 55 ⟶ 58:
* and <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#style_shortcuts>.
*/
// absolute: {
// dateStyle: "long",
// timeStyle: "short",
// },
},
Line 327 ⟶ 330:
// Replace the text.
var component = relativeDateComponent(then);▼
if (text) {
$(elt).text(text);
Line 346 ⟶ 336:
// Register for periodic updates.
▲ var component = relativeDateComponent(then);
$(elt).attr("data-localcomments-unit", component.unit);
}
|