/*
 *	Date/Time parsing definitions
 */
struct tops_date {		/* The IDTNC/ODTNC jsysi use this structure */
	int day;			/* Day in Month (1->31) 	*/
	int month;			/* Month (1->12)		*/
	int year;			/* Year (e.g. 1986)		*/
	int hour;			/* Hour (0->23)			*/
	int minute;			/* Minute (0->59)		*/
	int second;			/* Second (0->59)		*/
	int timezone;			/* Timezone (Mins. West of GMT)	*/
	int dst_on;			/* Daylight Savings Time is on	*/
	int day_of_week;		/* Day of Week (0=Sunday)	*/
	int day_of_year;		/* Day in Year (0->365)		*/
	int microseconds;		/* Fractional seconds		*/
	};

/*
 *	Input Date/Time parsing flags
 */
#define	IDT_NO_DATE		(1<<0)		/* Don't input date	*/
#define	IDT_NO_TIME		(1<<1)		/* Don't input time	*/
#define	IDT_NO_NUMERIC_MONTH	(1<<2)		/* Month must be named	*/
#define	IDT_SECOND_NUMBER_MONTH	(1<<3)		/* Canadian/European	*/
#define	IDT_RETURN_MONTH_ERROR	(1<<4)		/* Error if wrong order	*/
#define	IDT_NO_SECONDS		(1<<5)		/* No seconds allowed	*/
#define	IDT_MUST_HAVE_SECONDS	(1<<6)		/* Must specify seconds	*/
#define	IDT_NO_COLON		(1<<7)		/* No colon in hrs/mins	*/
#define	IDT_MUST_HAVE_COLON	(1<<8)		/* hrs/mins must have	*/
#define	IDT_NO_24HR_FORMAT	(1<<9)		/* Must be AM/PM style	*/
#define	IDT_NO_MERIDIEM		(1<<10)		/* No AM/PM/NOON/MID	*/
#define	IDT_NO_TIMEZONE		(1<<11)		/* No Timezone		*/
#define	IDT_PARTIAL_PARSE	(1<<12)		/* Accept partial spec.	*/
#define	IDT_FRACTIONAL_SECONDS	(1<<13)		/* Accept fraction secs.*/

/*
 *	Output Date/Time formatting flags
 */
#define	ODT_FORCE_DST		(1<<0)		/* Force DST On/Off	*/
#define	ODT_DST_ON		(1<<1)		/* DST On		*/
#define	ODT_USE_TIMEZONE	(1<<2)		/* Timezone is specified*/
#define	ODT_TIMEZONE(n)		(n << 20)	/* Timezone		*/
#define	ODT_TIMEZONE_EXTRACT(n)	(n >> 20)	/* Extract Timezone	*/
#define	ODT_NO_DATE		(1<<3)		/* Don't do date	*/
#define	ODT_DAY_OF_WEEK		(1<<4)		/* Output day of week	*/
#define	ODT_DAY_OF_WEEK_FULL	(1<<5)		/* Output full text	*/
#define	ODT_NUMERIC_MONTH	(1<<6)		/* Output numeric month	*/
#define	ODT_MONTH_FULL		(1<<7)		/* Output full text	*/
#define	ODT_4_DIGIT_YEAR	(1<<8)		/* 4 digit year		*/
#define	ODT_DAY_AFTER_MONTH	(1<<9)		/* Output day after mon	*/
#define	ODT_DATE_WITH_SPACES	(1<<10)		/* Use '-' vs ' '	*/
#define	ODT_DATE_WITH_SLASHES	(1<<11)		/* Use '-' vs '/'	*/
#define	ODT_NO_TIME		(1<<12)		/* Don't do time	*/
#define	ODT_NO_SECONDS		(1<<13)		/* Don't do seconds	*/
#define	ODT_12HR		(1<<14)		/* Do 12hr format	*/
#define	ODT_NO_HRS_MIN_COLON	(1<<15)		/* No ":" between hr/min*/
#define	ODT_DO_TIMEZONE		(1<<16)		/* Output timezone	*/
#define	ODT_NO_COLUMNATION	(1<<17)		/* Don't columnize	*/
#define	ODT_FRACTIONAL_SECONDS	(1<<18)		/* Do fractional seconds*/
