/*   FreeAdhocUDF - copyright (c) 2004-2007 adhoc dataservice GmbH
 *   Christoph Theuring / Peter Mandrella / Georg Horn
 *   (bug-)reports only to udf@adhoc-data.de
 *      based on FreeUDFLibC - copyright (c) 1999 Gregory Deatz
 *   Declarations script for all FreeAdhocUDF UDFs
 *   Notice: to use with dialect 3 (timestamp-field is TIMESTAMP)
 *   length of some cstring = 8190 or 4095 
 *   because so you can use one this UDF 4 (8) times in a piped string
 *   4 x 8190 = 32760 < 32762 (15 bit - 6 byte internal use)
 *   Functions in alphabetical order
 *
 *   new functions at the end of the scipt
 */

SET SQL DIALECT 3;

/******************************************************************************/
/****                 User Defined Functions: Date and TIME                ****/
/******************************************************************************/

DECLARE EXTERNAL FUNCTION F_ADDDAY
    TIMESTAMP,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'addday' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ADDHOUR
    TIMESTAMP,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'addhour' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ADDMINUTE
    TIMESTAMP,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'addminute' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ADDMONTH
    TIMESTAMP,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'addmonth' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ADDSECOND
    TIMESTAMP,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'addsecond' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ADDWEEK
    TIMESTAMP,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'addweek' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ADDYEAR
    TIMESTAMP,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'addyear' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINDAYS
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageindays' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINDAYSTHRESHOLD
    TIMESTAMP,
    TIMESTAMP,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageindaysthreshold' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINHOURS
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinhours' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINHOURSTHRESHOLD
    TIMESTAMP,
    TIMESTAMP,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinhoursthreshold' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINMINUTES
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinminutes' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINMINUTESTHRESHOLD
    TIMESTAMP,
    TIMESTAMP,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinminutes threshold' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINMONTHS
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinmonths' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINMONTHSTHRESHOLD
    TIMESTAMP,
    TIMESTAMP,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinmonthsthreshold' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINSECONDS
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinseconds' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINSECONDSTHRESHOLD
    TIMESTAMP,
    TIMESTAMP,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinsecondsthreshold' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINWEEKS
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinweeks' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINWEEKSTHRESHOLD
    TIMESTAMP,
    TIMESTAMP,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinweeksthreshold' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINYEARS
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinyears' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_AGEINYEARSTHRESHOLD
    TIMESTAMP,
    TIMESTAMP,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'ageinyearsthreshold' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CDOWLONG
    TIMESTAMP
    RETURNS CSTRING(16) FREE_IT
    ENTRY_POINT 'cdowlong' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CDOWLONGLANG
    TIMESTAMP,
    CSTRING(2)
    RETURNS CSTRING(16) FREE_IT
    ENTRY_POINT 'cdowlonglang' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CDOWSHORT
    TIMESTAMP
    RETURNS CSTRING(4) FREE_IT
    ENTRY_POINT 'cdowshort' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CDOWSHORTLANG
    TIMESTAMP,
    CSTRING(2)
    RETURNS CSTRING(16) FREE_IT
    ENTRY_POINT 'cdowshortlang' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CMONTHLONG
    TIMESTAMP
    RETURNS CSTRING(16) FREE_IT
    ENTRY_POINT 'cmonthlong' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CMONTHLONGLANG
    TIMESTAMP,
    CSTRING(2)
    RETURNS CSTRING(16) FREE_IT
    ENTRY_POINT 'cmonthlonglang' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CMONTHSHORT
    TIMESTAMP
    RETURNS CSTRING(4) FREE_IT
    ENTRY_POINT 'cmonthshort' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CMONTHSHORTLANG
    TIMESTAMP,
    CSTRING(2)
    RETURNS CSTRING(16) FREE_IT
    ENTRY_POINT 'cmonthshortlang' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DAYOFMONTH
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'dayofmonth' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DAYOFWEEK
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'dayofweek' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DAYOFYEAR
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'dayofyear' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DAYSBETWEEN
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'daysbetween' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DAYSOFMONTH
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'daysofmonth' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DTIME
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'dtime' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ENCODEDATE
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS DATE FREE_IT
    ENTRY_POINT 'encodedate' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ENCODETIME
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS TIME FREE_IT
    ENTRY_POINT 'encodetime' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ENCODETIMESTAMP
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'encodetimestamp' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_EQUALDATE
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'equaldate' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_EQUALDATETIME
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'equaldatetime' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_GFORMATD
    CSTRING(254),
    TIMESTAMP
    RETURNS CSTRING(254) FREE_IT
    ENTRY_POINT 'gformatd' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_HOUR
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'hour' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_HOURSBETWEEN
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'hoursbetween' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ISLEAPYEAR
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'isleapyear' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_LASTDAY
    INTEGER,
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'lastday' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_MAXDATE
    TIMESTAMP,
    TIMESTAMP
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'maxdate' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_MINDATE
    TIMESTAMP,
    TIMESTAMP
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'mindate' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_MINUTE
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'minute' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_MINUTESBETWEEN
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'minutesbetween' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_MONTH
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'month' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_MONTHSBETWEEN
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'monthsbetween' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_OSTERDATUM
    INTEGER
    RETURNS DATE FREE_IT
    ENTRY_POINT 'osterdatum' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_QUARTER
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'quarter' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_SECOND
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'second' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_SECONDSBETWEEN
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'secondsbetween' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_STRIPDATE
    TIMESTAMP
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'stripdate' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_STRIPTIME
    TIMESTAMP
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'striptime' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_STRTOTIME
    CSTRING(11)
    RETURNS TIME FREE_IT
    ENTRY_POINT 'strtotime' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_WEEK
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'week' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_WEEKOFYEAR
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'weekofyear' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_WEEKSBETWEEN
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'weeksbetween' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_WOY
    TIMESTAMP
    RETURNS CSTRING(8) FREE_IT
    ENTRY_POINT 'woy' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_YEAR
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'year' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_YEAROFYEAR
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'yearofyear' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_YEARSBETWEEN
    TIMESTAMP,
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'yearsbetween' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ZEITDIFFERENZ
    TIMESTAMP,
    TIMESTAMP,
    CSTRING(1)
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'zeitdifferenz' MODULE_NAME 'FreeAdhocUDF';

/* adhoc 2006-12-03 */

DECLARE EXTERNAL FUNCTION F_EXTRACTYEARDAY
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'r_yearday' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_EXTRACTWEEKDAY
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'r_weekday' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DOW
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'r_dow' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_RISLEAPYEAR
    INTEGER
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'r_isleapyear' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_RENCODEDATE
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'r_encodedate' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_RENCODEDATETIME
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER,
    INTEGER
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'r_encodedatetime' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DATETOSTR
   TIMESTAMP,
   CSTRING(254)
   RETURNS CSTRING(254) FREE_IT
   ENTRY_POINT 'datetostr' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_FIRSTDAYMONTH
   TIMESTAMP
   RETURNS TIMESTAMP FREE_IT
   ENTRY_POINT 'firstdaymonth' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_LASTDAYMONTH
   TIMESTAMP
   RETURNS TIMESTAMP FREE_IT
   ENTRY_POINT 'lastdaymonth' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ADDPERIOD
   CSTRING(254),
   CSTRING(254)
   RETURNS CSTRING(254) FREE_IT
   ENTRY_POINT 'addperiod' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_SUBPERIOD
   CSTRING(254),
   CSTRING(254)
   RETURNS CSTRING(254) FREE_IT
   ENTRY_POINT 'subperiod' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_PERIOD2SECONDS
   CSTRING(254)
   RETURNS INTEGER FREE_IT
   ENTRY_POINT 'period2seconds' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_SECONDS2PERIOD
   INTEGER
   RETURNS CSTRING(254) FREE_IT
   ENTRY_POINT 'seconds2period' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_TIMETODOUBLE
    TIMESTAMP
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'timetodouble' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DATETODOUBLE
    TIMESTAMP
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'datetodouble' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DOUBLETOTIME
    DOUBLE PRECISION
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'doubletotime' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_DOUBLETODATE
    DOUBLE PRECISION
    RETURNS TIMESTAMP FREE_IT
    ENTRY_POINT 'doubletodate' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_MILLISECOND
    TIMESTAMP
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'millisecond' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_INCDATE
   TIMESTAMP,
   INTEGER,
   INTEGER,
   INTEGER
   RETURNS TIMESTAMP FREE_IT
   ENTRY_POINT 'incdate' MODULE_NAME 'FreeAdhocUDF';
   
DECLARE EXTERNAL FUNCTION F_INCDATETIME
   TIMESTAMP,
   INTEGER,
   INTEGER,
   INTEGER,
   INTEGER,
   INTEGER,
   INTEGER
   RETURNS TIMESTAMP FREE_IT
   ENTRY_POINT 'incdatetime' MODULE_NAME 'FreeAdhocUDF';

/* adhoc 2007-04-19 */

DECLARE EXTERNAL FUNCTION F_KALENDERWOCHE
   TIMESTAMP
   RETURNS INTEGER FREE_IT
   ENTRY_POINT 'kalenderwoche' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_WEIBERFASTNACHT
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'weiberfastnacht' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ROSENMONTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'rosenmontag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_KARNEVALSDIENSTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'karnevalsdienstag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ASCHERMITTWOCH
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'aschermittwoch' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_PALMSONNTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'palmsonntag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_GRUENDONNERSTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'gruendonnerstag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_KARFREITAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'karfreitag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_OSTERSAMSTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'ostersamstag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_OSTERMONTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'ostermontag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_HIMMELFAHRT
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'himmelfahrt' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_PFINGSTSONNTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'pfingstsonntag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_PFINGSTMONTAG
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'pfingstmontag' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_FRONLEICHNAM
    INTEGER 
    RETURNS DATE FREE_IT
    ENTRY_POINT 'fronleichnam' MODULE_NAME 'FreeAdhocUDF';


/* adhoc 2007-07-09 */

