Skip to content

Commit

Permalink
New coding
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayrah87 committed Jun 22, 2018
1 parent b1b9872 commit b7afcd4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions index.php
@@ -1,17 +1,16 @@
<?php

//include the class once
include_once('./class/ukTaxWeek.php');
include_once './class/ukTaxWeek.php';

//instantiate the class
$taxWeek = new UKTaxWeeks;
$taxWeek = new UKTaxWeeks();

//Get the tax week of the date
$myDate = "01/06/2018";
echo "The tax week of this year is: " . $taxWeek->getTaxWeekByDate($myDate) . "<br />";
$myDate = '05/04/2018';
echo "Comparing date $myDate <br />";
echo 'The tax week of this year is: '.$taxWeek->getTaxWeekByDate($myDate).'<br />';

//Get tax week of the date when the financial year starts on another day (1st February, for example - 01/02)
$financialYearStartDate = "01/02";
echo "if the tax year started on $financialYearStartDate the financial week would be " . $taxWeek->getTaxWeekByDate($myDate,$financialYearStartDate);

?>
$financialYearStartDate = '01/10';
echo "if the tax year started on $financialYearStartDate the financial week would be ".$taxWeek->getTaxWeekByDate($myDate, $financialYearStartDate);

0 comments on commit b7afcd4

Please sign in to comment.