Back to Devexpress

WorkdaysOptions.LoadHolidays(String, String) Method

corelibraries-devexpress-dot-xtracharts-dot-workdaysoptions-dot-loadholidays-x28-system-dot-string-system-dot-string-x29.md

latest3.3 KB
Original Source

WorkdaysOptions.LoadHolidays(String, String) Method

Imports holidays from the specified file for the selected location.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
public void LoadHolidays(
    string fileName,
    string location
)
vb
Public Sub LoadHolidays(
    fileName As String,
    location As String
)

Parameters

NameTypeDescription
fileNameString

A String value that specifies the file name.

| | location | String |

A String value that specifies the location.

|

Remarks

Important

Note that there is a known vulnerability with CWE-73 (External Control of File Name or Path) when you use the LoadHolidays method in web applications. Refer to the following KB article for more information: False Positive Vulnerabilities - Known alerts detected by various security scanners and services (see the CWE-73: External Control of File Name or Path section)

Call the LoadHolidays method to import holidays in the DevExpress Scheduler ( .xml ) or Microsoft Office Outlook® ( .hol ) formats from a file. You can also use the WorkdaysOptions.Holidays property to populate the collection of holidays.

If you have Microsoft® Outlook on your machine, you can obtain the holidays list (the outlook.hol file) that is shipped with its installation. The default file location is:

drive:\Program Files\Microsoft Office\Office xx\LCID\outlook.hol

This file contains all known holidays for many countries (marked in square brackets and called locations) in the following format:

[United States] 168

Christmas Day,2006/12/25

Christmas Day,2007/12/25

Christmas Day,2008/12/25

Christmas Day,2009/12/25

Christmas Day,2010/12/25

Christmas Day,2011/12/25

Christmas Day,2012/12/25

Christmas Eve,2006/12/24

You can use this file to add a collection of holidays for the specified country.

See Also

Holidays

Data Aggregation

Work Time and Workday Configuration

WorkdaysOptions Class

WorkdaysOptions Members

DevExpress.XtraCharts Namespace