User:Mxn/CommentsInLocalTime/sandbox.js: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
Overshot a bit
 
(4 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 333 ⟶ 336:
// Register for periodic updates.
var component = relativeDateComponent(then);
$(elt).attr("data-localcomments-unit", component.unit);
}