函数名: setdate
功 能: 设置DOS日期
用 法: #include <dos.h>
void setdate(struct date *dateblk);
程序例:
#include <stdio.h>
#include <process.h>
#include <dos.h>
int main(void)
{
struct date reset;
struct date save_date;
getdate(&save_date);
printf("Original date:\n");
system("date");
reset.da_year = 2001;
reset.da_day = 1;
reset.da_mon = 1;
setdate(&reset);
printf("Date after setting:\n");
system("date");
setdate(&save_date);
printf("Back to original date:\n");
system("date");
return 0;
}