| cvs.gedasymbols.org/djgpp/doc/libc/libc_178.html | search | 
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] | 
#include <dos.h> unsigned int _dos_setdate(struct dosdate_t *date);  | 
This function sets the current date. The dosdate_t structure is as follows:
struct dosdate_t {
  unsigned char  day;       /* 1-31          */
  unsigned char  month;     /* 1-12          */
  unsigned short year;      /* 1980-2099     */
  unsigned char  dayofweek; /* 0-6, 0=Sunday */
};
 | 
dayofweek field has no effect at this function call.
See section _dos_getdate. See section _dos_gettime. See section _dos_settime.
Returns 0 if successful and non-zero on error (and sets errno=EINVAL).
| ANSI/ISO C | No | 
| POSIX | No | 
struct dosdate_t date;
date->year  = 1999;
date->month = 12;
date->day   = 31;
if ( !_dos_setdate(&date) )
  puts("It was a valid date.");
 | 
| webmaster | delorie software privacy | 
| Copyright © 2004 | Updated Apr 2004 |