\begindata{text,538353560}
\textdsversion{12}
\template{help}
\define{global
}
\chapter{Time O'Day:  a date and time inset

}
\section{What timeoday is

}\leftindent{
Timeoday is a date and time inset.  It is useful for print time stamping 
documents, and for building consoles.  When inserted into a document, not only 
does it display the current time of day, it will also indicate the time a 
document was printed.  As part of a console, timeoday allows flexibility by 
displaying the current time and/or date in a programmable fashion. 

}
\section{Starting timeoday

}\leftindent{
To insert a timeoday inset into an  \italic{ez}  document, press the \bold{Esc} 
key, and then the \bold{Tab} key, then type the word "timeoday"  in the prompt 
pane of your \helptopic{ez} window, and press the \bold{Enter} key.  You 
should now see the current date inserted into your document at the text caret.

}
\section{Warnings

}\leftindent{
Because timeoday is an inset, you cannot edit it as if it were text (although 
it appears to be text).  You can change the font in which  the text of the 
timeoday inset will print by formatting the text surrounding the timeoday 
inset.

}
\section{Pop-up menu meanings

}\leftindent{
On the "Time O'Day" menu card, there are three format options (you can add 
more in your  \italic{\helptopic{atkinit}}  file, see below):


\leftindent{\bold{Default	
	\
\begindata{timeoday,537469568}
Datastream version: 1
%o %A, %Y
andysans12
\enddata{timeoday,537469568}
\view{timeodayview,537469568,36,0,0}

H:MM AM/PM	
\begindata{timeoday,537469440}
Datastream version: 1
%u:%M %P
andysans12
\enddata{timeoday,537469440}
\view{timeodayview,537469440,37,0,0}

Month DD YYYY	
\begindata{timeoday,537469184}
Datastream version: 1
%o %A, %Y
andysans12
\enddata{timeoday,537469184}
\view{timeodayview,537469184,38,0,0}}

}
Although the "Default" and "Month DD YYYY" selections are the same, you can 
override the "Default" format via  \italic{\helptopic{preferences}}  .


}
\section{Using timeoday

}\leftindent{
Generally, timeoday would be placed on a title page, or near the top of your 
document.  This is so that when you print a document, it will automatically 
have the time "stamped" on it.  This is particularly important for documents 
"in-progress", or other material that needs to be dated.  You cannot place the 
timeoday inset into a header or footer, however (see 
 \italic{\helptopic{ez-troff}}  for more information on headers and footers).


You can also use the timeoday inset as part of an application, particularly 
one constructed with  \italic{\helptopic{arb}}  .  This is an easy way to 
present the time and date to the user without the overhead of 
 \italic{\helptopic{console}}  .

}
\section{Preferences

}\leftindent{
There are four preference options for timeoday:

\leftindent{\italic{timeodaydefaultformat}: string

\leftindent{The format string to use by default (i.e. when a timeoday inset is 
first created, and what the "Default" menu choice will be; "%o  %A, %Y" by 
default).

}}\leftindent{\italic{timeodaydefaultfontfamily}: string

\leftindent{The font family name ("andysans" by default).

}\italic{timeodaydefaultfonttype}: integer

\leftindent{The font face code (a bitmask, from 
ANDREWDIR/include/atk/fontdesc.ch; 0 by default).

}\italic{timeodaydefaultfontsize}: integer

\leftindent{The font size (12 by default).

}}
}\section{Programming timeoday

}
\leftindent{Format strings indicate what is displayed in a timeoday inset.  A 
format string is copied character for character except when a "%" character is 
encountered.  In this case, the character immediately following the "%" 
character determines what is printed, according to the following chart:

\leftindent{%	insert a % sign

n	insert a new-line character

t	insert a tab character

m	month of year - 01 to 12

O	month of year - 1 to 12

d	day of month - 01 to 31

A	day of month - 1 to 31

Z	ordinal day of month - 1st to 31st

y	last 2 digits of year - 00 to 99

Y	year - 1900 on ...

D	date as mm/dd/yy

H	hour - 00 to 23

u	hour - 1 to 12

M	minute - 00 to 59

S	second - 00 to 59

T	time as HH:MM:SS

j	day of year - 001 to 366

w	day of week - Sunday = 0

W	weekday - Sunday to Saturday

a	abbreviated weekday - Sun to Sat

h	abbreviated month - Jan to Dec

o	month - January to December

r	time in AM/PM notation

P	AM or PM

}
Besides specifying the default format via preferences, you can add new menu 
items to your  \italic{\helptopic{atkinit}}  file like so:

\leftindent{addmenu timeoday-set-format "Time 
O'Day,\italic{myformatname}~\italic{myformatposition}" timeodayview 
timeodayview noinherit "\italic{myformatstring}"


}for example:

\leftindent{addmenu timeoday-set-format "Time O'Day,Weekday Month nth 'yy~21" 
timeodayview timeodayview noinherit "%W, %o %Z, '%y"

}}

\section{Program Author}

\leftindent{
Michael McInerny, Information Technology Center (address mail to 
mcinerny+timeoday@andrew.cmu.edu).}


\section{Related tools}  


Select (highlight) one of the italicized names and choose "Show Help on 
Selected Word" from the pop-up menu to see the help file for:


\leftindent{\italic{\helptopic{insets}

\helptopic{ez}

\helptopic{preferences}

\helptopic{atkinit}

\helptopic{clock}

\helptopic{writestamp}}}


\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,40,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: This software is part of version 6.1 of the 

Andrew User Interface System and is 

the property of IBM, Carnegie Mellon University, 

and the other copyright holders.  The source 

code of this version is for the sole use of 

the individual named in ./config/allsys.h.  

This source code is not to be redistributed.  

Binary object code compiled or derived from 

these sources is not to be distributed to non-

members.  Members may have additional 

distribution rights granted by prior written 

permission of Carnegie Mellon University.



IBM, CARNEGIE MELLON UNIVERSITY, 

AND THE OTHER COPYRIGHT HOLDERS

 DISCLAIM ALL WARRANTIES WITH 

REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANT-

ABILITY AND FITNESS. IN 

NO EVENT SHALL  IBM, CARNEGIE 

MELLON UNIVERSITY, OR ANY OTHER 

COPYRIGHT HOLDER BE LIABLE FOR 

ANY SPECIAL, INDIRECT OR CONSE-

QUENTIAL DAMAGES OR ANY DAMAGES 

WHATSOEVER RESULTING FROM LOSS OF

USE, DATA OR PROFITS, WHETHER IN AN

ACTION OF CONTRACT, NEGLIGENCE OR

OTHER TORTIOUS ACTION, ARISING OUT 

OF OR IN CONNECTION WITH THE USE OR

PERFORMANCE OF THIS SOFTWARE.

 $

}}\enddata{text,538353560}
