/*===============================
|	DateTimeHandler.c
|
|	Blugs 1.1 handler for date/time text display
|	www.blugs.com
|
|	Copyright © 1998-2001 Brian Hall
|	You may use these routines in your software without restriction.
|
|===============================*/
#include "Blugs.h"


pascal UInt32 DateTimeHandler(		BLMessage			message,
									BLHandlerParamPtr	param		);

typedef struct
{
	UInt32		longDateTimeWord;
	UInt32		dateTimeWord;
	Handle		intlHandle;
	UInt32		flags;
} DateTimeHandlerRec, **DateTimeHdl;

/* Put desired global font number in variation code. */

enum
{
	dtSecondsFlavor			= 'SECS',	/* UInt32		I/O		MacOS standard count of seconds */
	dtFlagsFlavor			= 'FLAG',	/* UInt32		I		See flag bits below */
//	dtDateTimeFlavor		= 'DATE',	/* DateTimeRec	O		MacOS data structure */
	dtLongDateTimeFlavor	= 'LDAT',	/* LongDateCvt	I/O		MacOS data structure */
	dtTextFlavor			= 'TEXT',	/* Variable		O		Text version of data */
	dtIntlHandleFlavor		= 'INTL'	/* Handle		I		International utils resource hdl */
};



enum
{
	dt64BitRecord			= 1 << 0,
	dtShowDate				= 1 << 1,
	dtShowTime				= 1 << 2,
	dtDateFirst				= 1 << 3,
	dtLongDate				= 1 << 4, // Friday, January 24... (otherwise 1/24/93)
	dtAbbrevDate			= 1 << 5, // Fri, Jan 24.... (only applies to dtLongDate)
	dtWantSeconds			= 1 << 6,
	dtUseIntlHandle			= 1 << 7
};
