Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

$$WORKDAY^XUWORKDY: Workday Validation

NOTE: This API is dependent on the HOLIDAY (#40.5) file being updated by the sites.it.

Reference Type: Supported, Category: Miscellaneous, ICR#: 10046

Description

To use the ^XUWORKDY APIs, you must make sure that the HOLIDAY (#40.5) file is populated with each year's holidays for the workday calculation to work correctly. If it is not populated, you need to populate it yourself (Kernel distributes this file without data). Only enter holidays that fall on weekdays, however.

The $$WORKDAY^XUWORKDY extrinsic function returns:

If the date is imprecisely specified, or if the HOLIDAY global is empty, then $$WORKDAY^XUWORKDY returns a NULL string.

Format

  $$WORKDAY^XUWORKDY(date)

Input Parameters

date:

(required) Starting date in VA FileMan internal format (e.g., 2850420).

Output

returns:

Returns:

  • 1—Workday

  • 0—Non-Workday

Examples

Example 1

This example shows the return value when a workday in VA FileMan internal format is input:

>W $$WORKDAY^XUWORKDY(3090102)
1

Example 2

This example shows the return value when a non-workday in VA FileMan internal format is input:

>W $$WORKDAY^XUWORKDY(3090103)
0