Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7925793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:27:46+00:00 2026-06-03T18:27:46+00:00

Possible Duplicate: Finding weekend days based on culture Is there any locale info available

  • 0

Possible Duplicate:
Finding weekend days based on culture

Is there any locale info available in .NET to know if a given date falls on a weekday or a weekend?

i would use the function:

public Boolean IsWeekend(DateTime value, CultureInfo cultureInfo)
{
   return (value.DayOfWeek == DayOfWeek.Saturday || value.DayOfWeek == DayOfWeek.Sunday);
}

But it returns invalid results for some cultures.

Has .NET already done the work to compile what days are weekends for all cultures?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T18:27:47+00:00Added an answer on June 3, 2026 at 6:27 pm

    It is pretty interesting question and the answer seems to be no, there is no such function in .Net. Of course you can use DateTimeFormatInfo‘s FirstDayOfWeek Property, but it is not good enough.

    It will just tell you that there is high chance that preceding day was the weekend day. However, it is not very helpful (what about the other one and…), as there are countries that have just one day weekend. Also, in Muslim countries, they typically have Friday as a weekend day, but… Some of them have also Thursday, some Saturday, and I am sure I heard about country that has Friday and Sunday off. In this case, it would be quite hard to talk about a weekend…

    I took a look at CLDR Charts, but I can’t find appropriate information. It seems you are on your own.
    In theory, you may think of using ICU‘s Calendar class which has isWeekend() method but importing a dll just to use one class out of it sounds pretty bad.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicates: Finding duplicate files and removing them. In Python, is there a concise
Possible Duplicate: are there function pointers in c#? I'm interested in finding the difference
Possible Duplicate: Finding a single number in a list Given an array of numbers,
Possible Duplicate: What is the difference between graph-based databases and object-oriented databases? I'm finding
Possible Duplicate: Is there any way to clone a git repository’s sub-directory only? clone
Possible Duplicate: Finding the max repeated element in an array If there is a
Possible Duplicate: Finding the Variable Name passed to a Function in C# In C#,
Possible Duplicate: optimal algorithm for finding unique divisors I have asked this question before,
Possible Duplicate: “Least Astonishment” in Python: The Mutable Default Argument I'm finding that dictionary
Possible Duplicate: finding all numbers less than x in a BST How would I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.