Date and Calendar Analytics
Holidays based Calculations.

functions for holidays-based date calculations. More...

Functions

int __stdcall SFDB_ISVALIDHLDYCODE (LPCTSTR argHoliday)
 Examine the given code as a valid holiday code.
 
int __stdcall SFDB_HLDYS (LPCTSTR argPrefix, LPTSTR retVal, size_t *nLen)
 Returns an array of the matching supported holiday codes.
 
int __stdcall SFDB_FindHLDY (LONG argDate, LPCTSTR argHolidays, LPTSTR retVal, size_t *nLen)
 Returns the holiday code that falls on the given date.
 
int __stdcall SFDB_HLDYName (LPCTSTR code, LPTSTR retVal, size_t *nLen)
 Returns the full name of the holiday that corresponds to the given short code.
 
int __stdcall SFDB_HLDYDate (LONG argDate, LPLONG zDates, size_t nLen, LPCTSTR argHolidays, WORD retType, LPLONG retVal)
 Returns the date serial number that represents the holiday in the given year.
 
int __stdcall SFDB_ISHLDY (LONG argDate, LPLONG zDates, size_t nLen, LPCTSTR argHolidays)
 Returns TRUE when the start date falls on a holiday.
 
int __stdcall SFDB_HLDYDates (LONG argStartDate, LONG argEndDate, LPLONG zDates, size_t nLen, LPCTSTR szHolidays, LPLONG retVal, size_t *nSize)
 Returns an array of serial date numbers that represent observed holidays between the two given dates.
 
int __stdcall SFDB_ONEHLDYDates (LONG argStartDate, LONG argEndDate, LPCTSTR szHoliday, LPLONG retVal, size_t *nSize)
 Returns an array of serial date numbers that represent occurence of the given holiday between the two given dates.
 

Detailed Description

Function Documentation

◆ SFDB_FindHLDY()

int __stdcall SFDB_FindHLDY ( LONG argDate,
LPCTSTR argHolidays,
LPTSTR retVal,
size_t * nLen )
Parameters
[in]argDate(Required) The serial date number that represents the given date
[in]argHolidays(Required) the holiday name/prefix to search for. If missing, the full list of holidays will be returned.
[out]retVal(Required) The functions returns a (:_:) separated list of holiday names.
[in,out]nLen(Required) maximum number of characters to copy to the buffer.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDerror
See also
SFDB_ISWRKDY()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68

◆ SFDB_HLDYDate()

int __stdcall SFDB_HLDYDate ( LONG argDate,
LPLONG zDates,
size_t nLen,
LPCTSTR argHolidays,
WORD retType,
LPLONG retVal )
Parameters
[in]argDate(Required) The serial date number that represents the given date
[in]zDates(Optional) An array of holidays dates; each expressed as a serial number (i.e. number of days since 1.1.1970)
[in]nLen(Required) The number of dates in zDates.
[in]argHolidays(Optional) A (:_:) separated list of holiday names, calendars, countries or currency.
[in]retType(Optional) A switch to select the return output (1 = next holiday, 2= last holiday).
[out]retVal(Required) The functions returns the serial date number that represents the holiday.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDerror
See also
SFDB_ISWRKDY()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68

◆ SFDB_HLDYDates()

int __stdcall SFDB_HLDYDates ( LONG argStartDate,
LONG argEndDate,
LPLONG zDates,
size_t nLen,
LPCTSTR szHolidays,
LPLONG retVal,
size_t * nSize )
Parameters
[in]argStartDate(Required) a serial date number that represents start date.
[in]argEndDate(Required) a serial date number that represents finish date.
[in]zDates(Optional) An array of holidays dates; each expressed as a serial number (i.e. number of days since 1.1.1970)
[in]nLen(Required) The number of dates in zDates.
[in]szHolidays(Optional) A (:_:) separated list of holiday codes.
[out]retVal(Required) an array for the holiday dates.
[in,out]nSize(Required) maximum number of elements in the output array.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDerror
See also
SFDB_ISWRKDY()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68

◆ SFDB_HLDYName()

int __stdcall SFDB_HLDYName ( LPCTSTR code,
LPTSTR retVal,
size_t * nLen )
Parameters
[in]code(Required) The the given holiday short code
[out]retVal(Required) The functions returns the long holiday names.
[in,out]nLen(Required) maximum number of characters to copy to the buffer.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDerror
See also
SFDB_ISWRKDY()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68

◆ SFDB_HLDYS()

int __stdcall SFDB_HLDYS ( LPCTSTR argPrefix,
LPTSTR retVal,
size_t * nLen )
Parameters
[in]argPrefix(Required) the holiday name/prefix to search for. If missing, the full list of holidays will be returned.
[out]retVal(Required) The functions returns a (:_:) separated list of holiday names.
[in,out]nLen(Required) maximum number of characters to copy to the buffer.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDerror
See also
SFDB_FindHLDY()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68

◆ SFDB_ISHLDY()

int __stdcall SFDB_ISHLDY ( LONG argDate,
LPLONG zDates,
size_t nLen,
LPCTSTR argHolidays )
Parameters
[in]argDate(Required) The serial date number that represents the given date
[in]zDates(Optional) An array of holidays dates; each expressed as a serial number (i.e. number of days since 1.1.1970)
[in]nLen(Required) The number of dates in zDates.
[in]argHolidays(Optional) A (:_:) separated list of holiday codes
Returns
status code of the function call: NDK_TRUE, NDK_FALSE, and negative = error occurred.
Return values
NDK_TRUEgiven date falls on holiday
NDK_FALSEgiven date does not fall on holiday
ElseError code
See also
SFDB_HLDYDate()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68

◆ SFDB_ISVALIDHLDYCODE()

int __stdcall SFDB_ISVALIDHLDYCODE ( LPCTSTR argHoliday)
Parameters
[in]argHoliday(Required) the given holiday code.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDerror
See also
SFDB_FindHLDY()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68

◆ SFDB_ONEHLDYDates()

int __stdcall SFDB_ONEHLDYDates ( LONG argStartDate,
LONG argEndDate,
LPCTSTR szHoliday,
LPLONG retVal,
size_t * nSize )
Parameters
[in]argStartDate(Required) a serial date number that represents start date.
[in]argEndDate(Required) a serial date number that represents finish date.
[in]szHoliday(Required) A a holiday code (e.g., USA-MLK, CHN-CNY).
[out]retVal(Required) an array for the holiday dates.
[in,out]nSize(Required) maximum number of elements in the output array.
Returns
status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
Return values
NDK_SUCCESSsuccess
NDK_FAILEDerror
See also
SFDB_ISWRKDY()
Remarks
Example
Requirements
Target Platform Windows
Header SFDBM.h (include Windows.h)
Library SFDBM.lib
DLL SFDBM.dll
Since
v1.68