DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T n

⟦4a8519339⟧ TextFile

    Length: 2140 (0x85c)
    Types: TextFile
    Names: »newdate.1«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec1/newdate/newdate.1« 

TextFile

.TH NEWDATE 1 LOCAL
.UC 4
.SH NAME
newdate \- enhanced version of date(1)
.SH SYNOPSIS
.B newdate
.RB "[ yymmddhhmm [ " . "ss ] ]"
.br
.B newdate
.RB "+format_statement"
.SH DESCRIPTION
If no arguments are given, or the first argument doesn't start
with a `+' character, the standard 
.I date(1)
program is invoked.  
.sp
If the argument begins with a `+' sign, then it is interpreted
as follows:
.nf

	%n	carriage return
	%t	tab
	%%	percent sign
	
	%A	name of the day of the week
	%D	date in MM/DD/YY format
	%H	hour (0-23)
	%M	minute (0-59)
	%N	name of the month
	%S	second (0-59)
	%T	time as HH:MM:SS
	%a	abbreviated name of the day of the week
	%d	day of month (0-31)
	%h	abbreviated name of the month
	%j	Julian date (0-364)
	%m	month number (0-11)
	%r	time as HH:MM am/pm
	%w	day of week (0-6, 0=Sunday)
	%y	year - 1900  (0-99)
	%z	time zone name

.fi
any other characters encountered in the format instruction
(which must start with the `+' character) are copied as
is to the output.
.SH EXAMPLE
A nice date format can be obtained by using
.nf

  \fInewdate "+Today is %A, %N 19%d, %y at %r'"\fR

.fi
which results in output like
.nf

  \fIToday is Friday, December 12, 1986 at 11:02 pm\fR

.sp
Another interesting example is to use
.nf

  \fInewdate +Date: %a %h %d, %y %T %z\fR

.fi
to get the standard mail header line:
.nf

  \fIDate: Fri Dec 12, 86 23:05:40 PST\fR

.fi
.SH FILES
/bin/date for calls to the ``real'' date program.
.SH SEE ALSO
date(1)
.SH AUTHOR
Dave Taylor, Hewlett-Packard Labs
.SH COMPATABILITY
This program implements the System V 
.I date(1)
command with three new (and useful) additions,
namely the '%A' (full day name) '%N' (full month name)
and '%z' (time zone name).
.SH COMMENTS
Since this program calls 
.I /bin/date
for all arguments other than those starting with a `+',
it is expected that this can be called ``date'' and be
placed somewhere in the users path so that this is the
default program for calls to 
.I date(1).
.sp
The notation is really disgusting, but I'm just implementing
what was created on System V.  I suppose the correct way to
phrase this is ``it's compatible!'', but still....