A set of functions for exploring country-based calendar for use in calendar and business date calculations.
More...
|
| int __stdcall | SFDB_ISVALIDCNTRYCODE (LPCTSTR argCode) |
| | Return TRUE if the country code is a valid ISO country code (2 or 3 characters)
|
| |
| int __stdcall | SFDB_GETWKNDFROMCNTRY (LPCTSTR argCode, LPTSTR retVal, size_t *nLen) |
| | Return the weekend convention of the government calendar of the given country.
|
| |
| int __stdcall | SFDB_GETCALFROMCNTRY (LPCTSTR argCode, LPTSTR retVal, size_t *nLen) |
| | Return the calendar code associated with the given country.
|
| |
The API comes with pre-defined list of calendars adopted by the government of different countries.
◆ SFDB_GETCALFROMCNTRY()
| int __stdcall SFDB_GETCALFROMCNTRY |
( |
LPCTSTR | argCode, |
|
|
LPTSTR | retVal, |
|
|
size_t * | nLen ) |
Return the calendar code associated with the given country
- Parameters
-
| [in] | argCode | (Required) the ISO country code (e.g. US, GB, USA, GBR, etc.). |
| [out] | retVal | (Optional) the buffer that will receive the calendar code. |
| [in,out] | nLen | (Required) The 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
-
- Demo
std::wstring szCalCode = &szBuffer[0];
std::wcout << L" SUCCESS - SFDB_GETCALFROMCNTRY for GB is: " << szCalCode << std::endl;
- Requirements
| Requirement | Value |
| Target Platform | Windows |
| Header | SFDBM.h (include Windows.h) |
| Library | SFDBM.lib |
| DLL | SFDBM.dll
SFLUC.dll
SFLOG.dll |
- Since
- v1.56
- See also
-
- Examples
- country.cpp.
◆ SFDB_GETWKNDFROMCNTRY()
| int __stdcall SFDB_GETWKNDFROMCNTRY |
( |
LPCTSTR | argCode, |
|
|
LPTSTR | retVal, |
|
|
size_t * | nLen ) |
Return the weekend code (i.e. 7 characters) associated with the given country
- Parameters
-
| [in] | argCode | (Required) the ISO country code (e.g. US, GB, USA, GBR, etc.). |
| [out] | retVal | (Optional) the buffer that will receive the weekend code. |
| [in,out] | nLen | (Required) The 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
-
- Demo
std::wstring szCode(TEXT("GB"));
size_t nLen=28;
std::vector<TCHAR> szBuffer(nLen, 0x00);
std::wstring szWknCode = &szBuffer[0];
std::wcout << L" SUCCESS - SFDB_GETWKNDFROMCNTRY for GB is: " << szWknCode << std::endl;
- Requirements
| Requirement | Value |
| Target Platform | Windows |
| Header | SFDBM.h (include Windows.h) |
| Library | SFDBM.lib |
| DLL | SFDBM.dll
SFLUC.dll
SFLOG.dll |
- Since
- v1.56
- See also
-
- Examples
- country.cpp.
◆ SFDB_ISVALIDCNTRYCODE()
| int __stdcall SFDB_ISVALIDCNTRYCODE |
( |
LPCTSTR | argCode | ) |
|
Return TRUE if the country code is a valid ISO country code (2 or 3 characters)
- Parameters
-
| [in] | argCode | (Required) the ISO country code (e.g. US, GB, USA, GBR, etc.). |
- Returns
- status code of the function call: NDK_TRUE, NDK_FALSE, and negative = error occurred.
- Return values
-
- Demo
std::wcout << L" SUCCESS - SFDB_ISVALIDCNTRYCODE for US is valid." << std::endl;
std::wcout << L" SUCCESS - SFDB_ISVALIDCNTRYCODE for GBR is valid." << std::endl;
- Requirements
| Requirement | Value |
| Target Platform | Windows |
| Header | SFDBM.h (include Windows.h) |
| Library | SFDBM.lib |
| DLL | SFDBM.dll
SFLUC.dll
SFLOG.dll |
- Since
- v1.56
- See also
-
- Examples
- country.cpp.