Finding weekend days based on culture

后端 未结 5 732
礼貌的吻别
礼貌的吻别 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条回答
  •  盖世英雄少女心
    2020-12-19 03:22

    The only thing i know is how to get the day the week starts. Perhaps this can help:

    CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek
    

    from System.Globalization, perhaps you find in this package something.

    There are several Calendar-Classses like JulianCalendar, HebrewCalendar and so on. It could be possible to find there what you want.

提交回复
热议问题