Best laravel framework open-source packages.

Financial year carbon

A Carbon\Carbon Adapter for the RoussKS\FinancialYear library
Updated 2 years ago

\RoussKS\FinancialYear\CarbonAdapter - Carbon Adapter for RoussKS Financial Year PHP Library

Latest Version Build Status codecov GitHub license

General Details

This is the Carbon Adapter for the RoussKS\FinancialYear.

The library internally transforms, handles and returns Carbon Immutable Objects only.

Introduction, limitations and generic functionality is the same as the parent and described in RoussKS\FinancialYear readme.

Requirements

Installation

composer require roussks/financial-year-carbon

Basic Use

require_once __DIR__ . '/vendor/autoload.php';

// CarbonAdapter
// If instantiating with string, it must be of ISO-8601 format 'YYYY-MM-DD'
$startDate = new \Carbon\Carbon::createFromDate('2019-01-01');

$fy = new \RoussKS\FinancialYear\CarbonAdapter('calendar', $startDate);

echo $fy->getFyEndDate()->toDateString(); // 2019-12-31 

Versioning

The current library will be using Semantic Versioning

As it relies on the parent's RoussKS\FinancialYear Interface, it will limit versioning to MINOR releases. Hence, when the parent class has a new feature and upgrades the PATCH version, the current library will remain in the Minor version until the new feature is implemented.

Non-breaking changes will result in a MINOR or a PATCH version update as classified by SemVer.

Major version releases will not guarantee backwards compatibility.

Tags carbon php