1

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?

serializer
  • 1,003
  • 2
  • 13
  • 27

1 Answers1

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.