I'm trying to make a PHP-based site that archives by week, like Fark does. Thing is, I don't know how to query by week of the year.
How do I do that?
Name:
Anonymous2007-08-30 23:53 ID:P6wfNUmc
You select any record that has a time higher than the start of the Monday of that week and lower than the end of the Sunday of that week.
Name:
Anonymous2007-08-31 4:32 ID:Jl12X5sj
In each row of a table, I could keep the date of that week's Monday. The Monday is gotten when the row is inserted. Upon entering the site, the rows with the same date are queried, simplifying (and possibly expediating) the execution of the site.
The trick is in determining the Monday. I can find the week-number for a date: but how do I find the first date of a week-number?
>>12
even wikipedia, which is full of eurofags, says:
Its name in Arabic, Armenian, Georgian, Greek, Hebrew, Persian, Portuguese and Syriac means "second day". Quakers also traditionally refer to Monday as "Second Day" eschewing the pagan origin of the English name "Monday". For similar reasons the official liturgical calendar of the Roman Catholic Church refers to Monday as "Feria II". (The Portuguese name for Monday reflects this, as do all the days' names except Saturday and Sunday: the Portuguese word for Monday is segunda-feira.)
Name:
Anonymous2007-08-31 18:25 ID:hR9a07va
>>13
those guys need to choke on dick and get with the program
Name:
Anonymous2007-08-31 19:57 ID:kAiOLaY8
Fuck history, having Sunday as first day of week just complicates things further.
In the United States of Retarded Standards, what week does the weekend belong to?
having Sunday as first day of week just complicates things further.
not as much as having sunday as the first day of the week for millenia and then deciding to make monday the first day of the week for no reason at all.
Name:
Anonymous2007-08-31 20:29 ID:kAiOLaY8
Well, it makes much more sense. Either Monday or Saturday should be the first day of the week. I.e. 1 week = workweek + weekend or weekend + workweek. Now, weekEND would suggest the first, i.e. Monday.
Choosing Sunday is as retarded as choosing Wednesday. I don't care what day God allegedly rested. Changing from Sunday to Monday was a much appreciated bugfix. US should update.
Name:
Anonymous2007-08-31 23:31 ID:/GTMimgR
>>17
sunday being part of the weekend instead of part of the workweek is a relatively recent change.
Name:
Anonymous2007-08-31 23:58 ID:GI+DGroh
>>18
I think you're mistaking it with saturday, perhaps?