Article View: comp.os.msdos.programmer
Article #7272Re: finding the day of week from the date
From: Ping-Shun Huang
Date: Sun, 23 Jun 1991 20:08
Date: Sun, 23 Jun 1991 20:08
19 lines
1565 bytes
1565 bytes
In article <1468@ai.cs.utexas.edu> gideon@cs.utexas.edu (Timothy Tin-Wai Chan) writes: > So apparently DOS finds the day of the week itself. The question is, > how can I use this facility in DOS? Have your program query DOS for the current date. Save it. Set the DOS date to the date you want to know about. Read the day-of-week (see HELPPC or the commonly available interrupt list -- it's probably in the BIOS data area if DOS does not provide an service which explicitly returns it). Set the DOS date back to the current date. End. Disadvantages: there are sharp limits to how early you can set the DOS date (1-1-80 may well be the earliest date you can set it to, not positive). You're also taking a chance that Microsoft's code to determine the day of week may be buggy. -- Above text where applicable is (c) Copyleft 1991, all rights deserved by: UNIX:/etc/ping instantiated (Ping Huang) [INTERNET: pshuang@athena.mit.edu]
Technical Details
Message-ID:
<PSHUANG.91Jun23160834@beeblebrox.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!pshuangReferences:
<tr.677526990@samadams> <1468@ai.cs.utexas.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!pshuang From: pshuang@athena.mit.edu (Ping-Shun Huang) Subject: Re: finding the day of week from the date In-Reply-To: gideon@cs.utexas.edu's message of 22 Jun 91 16:17:56 GMT Message-ID: <PSHUANG.91Jun23160834@beeblebrox.mit.edu> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology References: <tr.677526990@samadams> <1468@ai.cs.utexas.edu> Date: Sun, 23 Jun 91 20:08:42 GMT Lines: 19