/*
 *	File:					MakeDate().h
 *	Description:	Returns the date in a time_t value
 *
 *	(C) 1993-1994, Ketil Hunn
 *
 */

#ifndef MAKEDATE_H
#define MAKEDATE_H

#include <devices/timer.h>
#include <clib/utility_protos.h>
#include <clib/timer_protos.h>
//#include <time.h>
#include <string.h>
//#include <dos.h>
#include "AdjustYear().h"

ULONG NewMakeDate(struct EventNode	*node)
{
	struct timeval		tv;
	struct ClockData	clockdata;

	GetSysTime(&tv);
	Amiga2Date(tv.tv_secs, &clockdata);
	clockdata.hour=clockdata.min=clockdata.sec=0;

	if(node!=NULL)
	{
		if(node->day)
			clockdata.mday	=node->day;
		if(node->month)
			clockdata.month	=node->month;
		if(node->year)
			clockdata.year	=AdjustYear(node->year);
	}
	return CheckDate(&clockdata);
}
#endif
