BLib.FDate - Read Time & Date Information ======================================= File: FDate - Update: 1.00 Author: J.G.Harston - Date: 15-Feb-1997 The FDate library provides functions to translate filing system time and date values. Convert date and time into filing system format =============================================== DEFFNf_date(day%,month%,year%) DEFFNf_time(hour%,minute%,second%) FNf_date() returns the specified date as a 16-bit value in filing system. FNf_time() returns the specified time as a 24-bit value in filing system format. Extract date and time from filing system format =============================================== DEFPROCf_date(fsdate%) DEFPROCf_time(fstime%) PROCf_date() sets the variables day%, month% and year% to the date represented by the 16-bit filing system date fsdate%. PROCf_time() sets the variables hour%, minute% and second% to the time represented by the 24-bit filing system time fstime%. Filing system time and date format ================================== A filing system date is stored in two bytes in the following format: byte 0 : b0-b4 : day of month 0-31 : b5-b7 : (year-1981) DIV 16 byte 1 : b0-b3 : month 0-15 : b4-b7 : (year-1981) MOD 16 If the date is &0000 (ie day=0, month=0, year=1981) then the date is unset. A filing system time is stored in three bytes in the following format: byte 0 : hour 0-23 byte 1 : minute 0-59 byte 2 : second 0-59 If b5-b7 of the hour or b7 or the minutes or seconds are not zero the time is invalid.