/* nwdate() */      /* create current date & time & date;time strings */
                    /*  87/08/10  */

#include <dos.h>

#include "extern.h"

nwdate()
  {  
	int i;

    struct TIM_CALEN {
    int year;
    char  month;
	char day;
	char what_day;
	char hour;
	char minute;
	char sec;
	char msec;
	char ext;
	}  calender;

	TIM_rdcalender(&calender);

	td[0] = calender.year - 1900; td[1] = calender.month;
	td[2] = calender.day; td[3] = calender.hour; td[4] = calender.minute;
	td[5] = calender.sec; td[6] = NULL;

    sprintf(nowdate,"%02d/%02d/%02d",td[0],td[1],td[2]);
        nowdate[8] = NULL;
    sprintf(nowtime,"%02d:%02d",td[3],td[4]);
        nowtime[5] = NULL;
    sprintf(nowday,"%s%s",nowdate,nowtime);
        nowday[13] = NULL;
	return(0);
  }

