Last active
November 17, 2022 10:06
-
-
Save arif98741/92e3e62f50f5c8e7b3bd43d8c440e6c7 to your computer and use it in GitHub Desktop.
This is a file of r & d for starting date of current quarter, ending date of current quarter , starting date of previous quarter , ending date of previous quarter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "start of current quarter date: "; | |
$startofQuarter = Carbon::now()->startOfQuarter(); | |
echo $startofQuarter; | |
echo "\n"; | |
echo "end of current quarter date: "; | |
$startofQuarter = Carbon::now()->endOfQuarter(); | |
echo $startofQuarter; | |
echo "\n"; | |
echo "previous quarter starting date: "; | |
$previousQuarter = Carbon::now()->startOfQuarter()->subMonths(3)->format('Y-m-d'); | |
echo $previousQuarter; | |
echo "\n"; | |
echo "previous quarter ending date: "; | |
$previousQuarter = Carbon::make($previousQuarter)->endOfQuarter()->format('Y-m-d'); | |
echo $previousQuarter; | |
echo "\n"; | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment