Revision as of 20:08, 15 June 2009 editGary (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers, Rollbackers102,842 edits ce lead← Previous edit | Revision as of 18:24, 17 July 2009 edit undoGary (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers, Rollbackers102,842 edits →Style: add !importantNext edit → | ||
Line 52: | Line 52: | ||
To change the timestamp's style, add the code below to ] and modify it using ]. For example, to change the timestamp's size, increase or decrease the percentage in the code accordingly, such as to {{bcode|90%}}. | To change the timestamp's style, add the code below to ] and modify it using ]. For example, to change the timestamp's size, increase or decrease the percentage in the code accordingly, such as to {{bcode|90%}}. | ||
<source lang=css>.localcomments { font-size: 100%; }</source> | <source lang=css>.localcomments { font-size: 100% !important; }</source> | ||
{{Misplaced Pages:Comments in Local Time/to do}} | {{Misplaced Pages:Comments in Local Time/to do}} |
Revision as of 18:24, 17 July 2009
ShortcutsComments in Local Time is a gadget that converts timestamps, including those that appear in signatures, from Coordinated Universal Time to your local time. The code is at comments in local time.js.
Installation
To enable this gadget, go to your preferences, click on the "Gadgets" tab, and checkmark the box labeled "Change UTC-based time and date stamps, such as those used in talk page comments, to be relative to local time."
Examples
This:
00:00 1 January 2009 (UTC)
Appears as
31 December 2008, Wednesday (2 days ago), 7:00 pm (UTC-5)
The date returned is shown in your local time, based on your computer's timezone settings. Dates that are either today, yesterday, or tomorrow are shown with a relative dates, such as
Today, 0:00 am (UTC-5)
Settings
Default settings
LocalComments = { dateDifference: true, dateFormat: 'dmy', timeFirst: true, };
Custom settings
To change the default settings, copy the above code to your monobook.js page and change the values after the equals sign. The settings are explained in greater detail below.
- dateDifference
- Shows the difference in terms of days, months, and years from the timestamp and today's date.
- Options:
true
to show the difference between the timestamp and today's date, andfalse
to hide the difference
- dateFormat
- Changes the date's format.
- Options:
'dmy'
for "1 January 2009",'mdy'
for "January 1, 2009", and'ymd'
for "2009-01-01"
- timeFirst
- Changes the order in which the time and date appears in timestamps.
- Options:
true
for the time to appear before the date, andfalse
for the date to appear before the time
Style
To change the timestamp's style, add the code below to your monobook.css page and modify it using Cascading Style Sheets. For example, to change the timestamp's size, increase or decrease the percentage in the code accordingly, such as to 90%
.
.localcomments { font-size: 100% !important; }Category: