| 1675 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace LaracraftTech\LaravelDateScopes;
|
|
|
4 |
|
|
|
5 |
/**
|
|
|
6 |
* In statistics, when asking for "the last 7 days", the current day may or may not be included
|
|
|
7 |
* in the calculation depending on the context and the specific requirements of the analysis.
|
|
|
8 |
*
|
|
|
9 |
* If you want to include the current day in the calculation, you would generally use an inclusive range,
|
|
|
10 |
* meaning that you would include records created on the current day as well as records
|
|
|
11 |
* created in the previous 6 days.
|
|
|
12 |
*
|
|
|
13 |
* If you want to exclude the current day in the calculation, you would generally use an exclusive range,
|
|
|
14 |
* meaning that you would include records created in the previous 7 days,
|
|
|
15 |
* but not records created on the current day.
|
|
|
16 |
*
|
|
|
17 |
* Ultimately, it depends on the context and what you're trying to achieve with your data.
|
|
|
18 |
* It's always a good idea to clarify the requirements and expectations with stakeholders
|
|
|
19 |
* to ensure that you're including or excluding the correct records.
|
|
|
20 |
*
|
|
|
21 |
* The same concept applies to other time intervals like weeks, months, quarters, and years etc.
|
|
|
22 |
*/
|
|
|
23 |
enum DateRange: string
|
|
|
24 |
{
|
|
|
25 |
case INCLUSIVE = 'inclusive';
|
|
|
26 |
case EXCLUSIVE = 'exclusive';
|
|
|
27 |
}
|