Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>_dos_setdate</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_dos_setdate
============

Syntax
------

     #include <dos.h>
     
     unsigned int _dos_setdate(struct dosdate_t *date);

Description
-----------

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.

_dos_getdate:. _dos_gettime:. _dos_settime:.         

Return Value
------------

Returns 0 if successful and non-zero on error (and sets ERRNO=EINVAL).

Example
-------

     struct dosdate_t date;
     
     date->year  = 1999;
     date->month = 12;
     date->day   = 31;
     if ( !_dos_setdate(&date) )
       puts("It was a valid date.");


See Also: _dos_getdate _dos_gettime _dos_settime

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson