- 0
php Split array into weeks (this week / next week) by date?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
WordPress-Theme Twenty Twenty Four-customizing: how to do that - a Gutenberg special question...
By thedhubs,
- 1 answer
- 1,188 views
-
- 3 answers
- 4,625 views
-
QNAP issues patch for an RCE security vulnerability affecting PHP in NAS Drive management
By Alap Naik Desai,
- remote code execution
- rce
- (and 12 more)
- 0 replies
- 18 views
-
Get this Dynamic 2022 Data & IT Security Training Bundle at 97% off
By News Staff,
- neowin deals
- cyber security
- (and 4 more)
- 0 replies
- 12 views
-
Save 98% off this 27 Course Premium Learn to Code Certification Bundle
By News Staff,
- neowin deals
- coding
- (and 10 more)
- 0 replies
- 15 views
-
Question
game_over
I am trying to build a list of events that is split into weeks.. more specifically: this week, next week and then anything after.
Most of the help I can find online is relative to the current day so it's not accurate.
I want the 1st heading 'This week' to list all events happening this week (mon - sun) regardless of what day of the week it is... in this weeks case the week starts on 01/06/15 and ends on 07/06/15 < this is true for any date between 01-07 ..
The 2nd heading would be 'Next week' and would list all events happening next week 08/06/15 - 14/06/15
Since tomorrow is 08/06/15 all events listed here would be be moved to 'This week'.
In short, I need to be able to get week start (mon) and end (sun) of the current week, and the following week.
Link to comment
https://www.neowin.net/forum/topic/1259374-split-array-into-weeks-this-week-next-week-by-date/Share on other sites
3 answers to this question
Recommended Posts