Questions tagged [week-number]

Based on Gregorain calendar, every week of a year has a number from 1 to 52, 53 or 54. Use this tag for instance if you want to calculate the weeknumber from a certain date or vice versa. You also might include the date tag. This tag is independent of programming language.

603 questions
-4
votes
2 answers

Find number of weeks in a month

Can someone suggest a function to return number of weeks in a month? for example: def num_of_weeks(year, month): # Do calulation return int(num) # In 2016 Julay we had five weeks print num_of_weeks(2016, 1) >> 5 print num_of_weeks(2016,…
Ehsan Toghian
  • 548
  • 1
  • 6
  • 26
-4
votes
2 answers

what is the most efficient way to get 1 or 2 day before the first day of week number and year in php with native functions

I need to use php to return the Saturday or Sunday before the given week number and year, for example: date('Y-m-d',strtotime("2011W011")) #returns '2011-01-03', but I need it to return '2011-01-01 or 2011-01-02 instead …
xam
  • 452
  • 2
  • 7
  • 15
-5
votes
2 answers

How to get week number from date input in javascript?

I am trying to get the week number of current date / specific date falls in. Any suggestions for logic building will be helpful.
Ravi Kaware
  • 1
  • 1
  • 2
1 2 3
40
41