Some countries use work days Monday to Friday and some Monday - Saturday. Is it possible to retrieve this information through regional settings or similar in .NET?
Asked
Active
Viewed 43 times
1
-
Is this supposed to be an Excel question or something similar? – BSMP Jul 26 '16 at 17:25
-
Have an interresting read [here](http://stackoverflow.com/a/1044782/4558029) – lokusking Jul 26 '16 at 17:45
1 Answers
0
You could just use a database or XML file for this kind of thing. The .NET framework itself won't have this kind of information as far as I know. If you really wanted to get it from the CultureInfo class, for example, you could always use a Decorator, Extension Method, or subclass (the CultureInfo class is not sealed) and have it call your database. You could also add it to the Calendar class through one of the same means (e.g. have an IsWorkDay() extension method or property).
The advantage of this approach is that it would be simple to extend if you decided you wanted other regional information later.
The downside, of course, is that that's a lot of manual data entry.

EJoshuaS - Stand with Ukraine
- 11,977
- 56
- 49
- 78