COMMENT @----------------------------------------------------------------------

	Copyright (c) GeoWorks 1989 -- All Rights Reserved

PROJECT:	PC GEOS
FILE:		timedate.def

DECLARER:	Kernel

DESCRIPTION:
	This file defines time and date structures and routines.

	$Id: timedate.def,v 1.1 97/04/04 14:24:46 newdeal Exp $

------------------------------------------------------------------------------@

SetDef	__TIMEDATE

StartKernel

global TimerGetDateAndTime:far
global TimerSetDateAndTime:far
TimerGetFileDateTime equ <TIMERGETFILEDATETIME>

;-

global TIMERGETDATEANDTIME:far
global TIMERSETDATEANDTIME:far
global TIMERGETFILEDATETIME:far

;--------------------------------------------------------------------------
;	structures for LocalCompareDateTimes, LocalNormalizeDateTime
;--------------------------------------------------------------------------
DayOfTheWeek	etype word
DOTW_SUNDAY		enum DayOfTheWeek
DOTW_MONDAY		enum DayOfTheWeek
DOTW_TUESAY		enum DayOfTheWeek
DOTW_WEDNESDAY		enum DayOfTheWeek
DOTW_THURSDAY		enum DayOfTheWeek
DOTW_FRIDAY		enum DayOfTheWeek
DOTW_SATURDAY		enum DayOfTheWeek

TimerDateAndTime	struct
    TDAT_year		word
    TDAT_month		word
    TDAT_day		word
    TDAT_dayOfWeek	DayOfTheWeek
    TDAT_hours		word
    TDAT_minutes	word
    TDAT_seconds	word
TimerDateAndTime	ends

;--------------------------------------------------------------------------
;			Values to pass to TimerSetDateAndTime
;--------------------------------------------------------------------------

SetDateTimeParams	record
    SDTP_SET_DATE:1		;TRUE: set date (must be bit 7)
    SDTP_SET_TIME:1		;TRUE: set time (must be bit 6)
    :6
SetDateTimeParams	end

TIME_SET_DATE		equ	mask SDTP_SET_DATE
TIME_SET_TIME		equ	mask SDTP_SET_TIME

; make sure bit 5 of SetDateTimeParams not defined, as that is
; reserved for a system function (see timerInt.def)
CheckHack <(mask SetDateTimeParams and 20h) eq 0>

EndKernel
