2016-01-27 11:54:04 +10:00
|
|
|
<?php
|
2016-05-20 12:27:31 +02:00
|
|
|
/**
|
|
|
|
* FiscalHelperInterface.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
2016-10-05 06:52:15 +02:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-05-20 12:27:31 +02:00
|
|
|
*/
|
|
|
|
|
2016-02-05 12:08:25 +01:00
|
|
|
declare(strict_types = 1);
|
2016-01-27 11:54:04 +10:00
|
|
|
|
|
|
|
namespace FireflyIII\Helpers;
|
|
|
|
|
|
|
|
use Carbon\Carbon;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface FiscalHelperInterface
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Helpers
|
|
|
|
*/
|
|
|
|
interface FiscalHelperInterface
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method produces a clone of the Carbon date object passed, checks preferences
|
2016-02-04 07:23:14 +01:00
|
|
|
* and calculates the last day of the fiscal year.
|
2016-01-27 11:54:04 +10:00
|
|
|
*
|
2016-02-04 07:23:14 +01:00
|
|
|
* @param Carbon $date
|
2016-01-27 11:54:04 +10:00
|
|
|
*
|
|
|
|
* @return Carbon date object
|
|
|
|
*/
|
2016-04-06 16:37:28 +02:00
|
|
|
public function endOfFiscalYear(Carbon $date): Carbon;
|
2016-01-27 11:54:04 +10:00
|
|
|
|
|
|
|
/**
|
2016-02-04 07:23:14 +01:00
|
|
|
* This method produces a clone of the Carbon date object passed, checks preferences
|
|
|
|
* and calculates the first day of the fiscal year.
|
2016-01-27 11:54:04 +10:00
|
|
|
*
|
2016-02-04 07:23:14 +01:00
|
|
|
* @param Carbon $date
|
2016-01-27 11:54:04 +10:00
|
|
|
*
|
|
|
|
* @return Carbon date object
|
|
|
|
*/
|
2016-04-06 16:37:28 +02:00
|
|
|
public function startOfFiscalYear(Carbon $date): Carbon;
|
2016-01-27 11:54:04 +10:00
|
|
|
|
|
|
|
}
|