![]() ![]() If (endOfYear.DayOfWeek < DayOfWeek.Thursday)Ĭonsole.WriteLine("tuan cua ngay :" + wk. Nds = NewDate.Subtract(startOfYear).Days + iso8601Correction StartOfYear = fromDate.AddDays(-NewDate.Day + 1).AddMonths(-NewDate.Month + 1) ĮndOfYear = startOfYear.AddYears(1).AddDays(-1) The WEEKNUM function takes a date and returns a week number (1-54) that corresponds to the week of year. ![]() Count Days Add Days Workdays Add Workdays Weekday Week. Return Week Number of Previous Year in some cases () Week Number Calculator: What Week of the Year Is It Enter a week number to locate the week on a calendar or enter any date to see in which week number it falls. Week numbers: ISO 8601 (week starts Monday) - week 1 is the first week with Thursday. Int nds = fromDate.Subtract(startOfYear).Days + iso8601Correction Ĭonsole.WriteLine("nds: " + nds.ToString()) The year 2016 is a leap year, with 366 days in total. Int iso8601Correction = Ĭonsole.WriteLine("fromDate.Subtract(startOfYear).Days: " + fromDate.Subtract(startOfYear).Days.ToString()) Ĭonsole.WriteLine(": " + ()) Ĭonsole.WriteLine("iso8601Correction: " + iso8601Correction.ToString()) Week number Moon phases (Full Moon) Current moon phase Moon calendar 2023 Moon phases (Full Moon) 2023 & 2024 World Clock. You can use something like this DateTime fromDate = new DateTime(2016, 1, 1) // Return Week Number for this dateĭateTime startOfYear = fromDate.AddDays(-fromDate.Day + 1).AddMonths(-fromDate.Month + 1) ĭateTime endOfYear = startOfYear.AddYears(1).AddDays(-1)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |