\begindata{text,538396072}
\textdsversion{12}
\template{help}
\define{global
}
\chapter{Write Stamp:  a date and time stamp inset

}
\section{What writestamp is

}\leftindent{
writestamp is a date and time stamp inset.  It is useful for write time 
stamping documents.  When inserted into a document it will display the last 
time of a document was written.  It will also indicate the last write time 
when a document it printed.

}
\section{Starting writestamp

}\leftindent{
To insert a writestamp inset into an  \italic{\helptopic{ez}}  document, press 
the \bold{Esc} key, and then the \bold{Tab} key, then type the word 
"writestamp"  in the prompt pane of your 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 writestamp 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 writestamp inset will print by formatting the text surrounding the 
writestamp inset.

}
\section{Pop-up menu meanings

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


\leftindent{\bold{Default	
	\
\begindata{writestamp,537469184}
Datastream version: 1
%o %A, %Y
andysans12
724628352
\enddata{writestamp,537469184}
\view{writestampview,537469184,31,0,0}

H:MM AM/PM	
\begindata{writestamp,537469440}
Datastream version: 1
%u:%M %P
andysans12
724628352
\enddata{writestamp,537469440}
\view{writestampview,537469440,32,0,0}

Month DD YYYY	
\begindata{writestamp,537469568}
Datastream version: 1
%o %A, %Y
andysans12
724628352
\enddata{writestamp,537469568}
\view{writestampview,537469568,33,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 writestamp

}\leftindent{
Generally, writestamp 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 
writestamp inset into a header or footer, however (see 
 \italic{\helptopic{ez-troff}}  for more information on headers and footers).

}
\section{Preferences

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

\leftindent{\italic{writestampdefaultformat}: string

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

}}\leftindent{\italic{writestampdefaultfontfamily}: string

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

}\italic{writestampdefaultfonttype}: integer

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

}\italic{writestampdefaultfontsize}: integer

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

}}
}\section{Programming writestamp

}
\leftindent{Format strings indicate what is displayed in a writestamp 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 writestamp-set-format "Write 
Stamp,\italic{myformatname}~\italic{myformatposition}" writestampview 
writestampview noinherit "\italic{myformatstring}"


}for example:

\leftindent{addmenu writestamp-set-format "Write Stamp,dd-Mmm-yy~21" 
writestampview writestampview noinherit "%d-%h-%y"

}}

\section{Program Author}

\leftindent{
Michael McInerny, Information Technology Center (address mail to 
mcinerny+writestamp@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{timeoday}}}


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

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 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,538396072}
