Finding weekend days based on culture

后端 未结 5 733
礼貌的吻别
礼貌的吻别 2020-12-19 02:34

Is there a way to find the days that constitute a weekend or workweek based on different cultures using the .NET framework? For example, some Muslim countries have a workwee

5条回答
  •  旧时难觅i
    2020-12-19 03:04

    I won't give you a .NET answer, but I will say that you won't base it on "culture", but rather on country.

    You can get country from IP with a fir degree of accuracy (but it will never be 100%). After that, I would suggest a lot of googling, because I doubt that you are going to find the code already written.

    (you might also look into some open source calendar/appointment programs, especially widely-used ones, like on Linux, or maybe Lightning, the Thunderbird plug-in. If you wade through their code, you might find the data for this)

    Fortunately, though, you just face a grind, rather than something difficult to implement.

    Good luck!

提交回复
热议问题