csh -> Bourne conversion

Bob Lenk rml at hpfcdc.HP.COM
Wed Jan 25 08:13:15 AEST 1989


>	$ date=`date +%d-%h-19%y`
>
> 	Actually, this brings up a point that programmers everywhere should
> start thinking about:  all of those hardcoded "19"'s in programs are going to
> be useless in the year 2000.  Think of all the shell scripts/programs
> like the command above...perhaps using a variable or adding a format
> to the date command (I notice that 'Y' isn't being used...a quick patch
> to date would make it so that 'Y' would give you all four digits) would be
> better, such as "date +%d-%h-$CENTURY%y" or "date +%d-%h-%Y".

The current draft of the IEEE 1003.2 standard specifies %Y as giving
the year with century.

		Bob Lenk
		hplabs!hpfcla!rml
		rml%hpfcla at hplabs.hp.com



More information about the Comp.unix.questions mailing list