#!/bin/csh
set date=(`date`)
#echo $date
#echo $date[6]
@ yr = $date[6] - 2000
# exit 0
#
awk '# date-month -- convert mm/dd/yy to month day, year\
\
# build list of months and put in array. \
BEGIN { \
	listmonths="January,February,March,April,May,June,July,August,September,October,November,December" \
	split( listmonths,month,"," )\
}\
\
# check that there is input\
$1 != "" {\
\
# split on "/" the first input field into elements of array\
	z = split($1,date,"/")\
\
# check that only one field is returned\
	if (z == 1)\
		# try to split on "-"\
		z = split($1,date,"-")\
\
# must be invalid\
	if (z == 1)\
		exit\
\
# add 0 to number of month to ensure numeric type \
	date[1] += 0\
\
# print month day, year\
	if (date[3]<'$yr')\
		printf "%s %s%02d\n",month[date[1]], date[2]", 20" , date[3] \
	else\
		printf "%s %s%02d\n",month[date[1]], date[2]", 19" , date[3] \
}' -
