Google Calendar Display Current Time Line

By yooskeh Last update Mar 15, 2008 — Installed 33,897 times.

Script Summary: Shows line and time display at current time on day view, week view and custom view.



Version: 0.3.15

Note: Now Google Calendar support current time line in natively. If you use this script, you should check that setting of "Show current time" is "No".

Settings

You can set the style of the line with the setting panel of Google Calendar. Please open setting panel by click "Settings" and "Time Line" tab (or click User Script Commands... > Setting for Display Current Time Line sub-menu). The meaning of each setting is as follows.

Show time
Whether displays time on the line is set. If it is "No", time is not displayed.
Time format
The format of time is set. Special strings:
h: hour(0-23), hh: hour(00-23), H: hour(1-12), HH: hour(01-12), m: minute(0-59), mm: minute(00-59), s: second(0-59), ss: second(00-59), am: "am" or "pm", AM: "AM" or "PM".
The string placed between the quotation mark (" or ') is output as it is.
Line style and Time style
The style of the line and time is set by CSS. There is samples in the below.

Note: This is a local setting. It not synchronize with other PC.

Samples for the line style

The line with triangle marker

Line style:

height: 0;
border: 6px transparent solid;
border-left-color: black;
border-right-width: 0;
opacity: 0.7;

Time style:

height: 1px;
background: black;
color: black;
text-align: right;
font-size: 11px;
font-weight: bold;
padding-right: 1px;

Time display in the dotted box

Line style:

height: 11px;
border: 1px dotted green;
opacity: 0.5;

Time style:

background: #FFFFCC;
color: green;
font-size: 11px;
font-weight: bold;
line-height: 1;
text-align: center;

The line with side time display

Line style:

background: red;
border: 1px solid black;
height: 1px;
border-width: 1px 0;
opacity: 0.7;
margin-left: -3px;

Time style:

background: black;
color: white;
font-size: 11px;
text-align: right;
position: absolute;
right: 100%;
line-height: 1;
margin-top: -6px;
padding: 1px 4px 1px 0;
width: 36px;

The line with caption

Time format:

"<i>New York</i><br>" h:mm

Line style:

border-top: 1px dotted green;
height: 0;
opacity: 0.7;
line-height: 1;

Time style:

color: green;
font-size: 11px;
margin-top: -12px;
padding-right: 1px

ChangeLog

v0.3.15 (2008-03-15)
Fix bug by update of Google Calendar.
v0.3.12 (2008-02-21)
Fix bug by update of Google Calendar.
v0.3.10 (2008-02-14)
Fix script.
Use original setting panel.
v0.3.9 (2007-10-28)
Allows quoted string on the time format string.
v0.3.8 (2007-10-27)
Adding the time line from a setting panel became possible.
v0.3.7 (2007-10-25)
Fix bug on setting panel.
v0.3.6 (2007-10-21)
To be able to set the style of the line with the setting panel of Google Calendar.
v0.3.1 (2007-10-17)
Format of time became editable.
v0.3.0 (2007-10-10)
Show current time on line.
Automatically justify and centering line.
v0.2.5 (2007-05-13)
Support different time line.
v0.2.2 (2007-05-03)
Correspond to the update of Google Calendar.
v0.2.1 (2007-04-13)
Rewrite script to easily edit line style.
v0.2.0 (2007-03-17)
Change the line to only cross the current day.
v0.1.1 (2007-03-12)
Fix not to work in some case.
v0.1.0 (2007-03-11)
First version.