newphpcoder — 2012-08-13T02:05:20-04:00 — #1
I have 2 tables for week and calendar days.
first I have so_week
second is calendar_days
from_week : 33
and so on
now I need to get the working days based on from_week to week
for example from 33 to 36 the month is aug, sep, sep, sep i need to get the working days for that month.
any help is highly appreciated..
Thank you so much
r937 — 2012-08-13T03:38:32-04:00 — #2
it cannot be done with that data
newphpcoder — 2012-08-13T04:20:18-04:00 — #3
r937 — 2012-08-13T08:24:58-04:00 — #4
please explain how you would arrive at the right answer for weeks 33 to 36
system — 2012-08-13T10:57:22-04:00 — #5
If we're talking about two random weeks, then it's very simple. You only need to account for possible start of the year and end of the year incomplete weeks.
Otherwise, any week in between is a full week: 7 days total minus the 2 days week-end.
33: 5 days
34: 5 days
35: 5 days
36: 5 days
20 days total. Of course, you need to count down the legal holidays.
Unless you mean something else. Like between two random dates.
kduv — 2012-08-14T20:30:11-04:00 — #6
You would probably want to make a table of all the weeks in a year, and how many working days are in each week number.
mittineague — 2014-09-20T03:07:35-04:00 — #7
This topic is now archived. It is frozen and cannot be changed in any way.