<?php
class getDateInfo
{
private $year;
private $week;
function __construct($year, $week) {
$this->year = $year;
$this->week = $week;
}
function dateInfo()
{
$dto = new DateTime();
$dto->setISODate($this->year, $this->week);
$this->fullDate = $dto->setISODate($this->year, $this->week, 2)->format('D M d, Y');
}
function get_fullDate() {
return $this->fullDate;
}
}
?>
<?php
include "class.php";
$report__current_week__year = "2019";
$report__current_week__week = "46";
$reportDate = new getDateInfo($report__current_week__year, $report__current_week__week);
$reportDate->dateInfo();
$reportDate__date = $reportDate->get_fullDate();
echo "<p>$reportDate__date</p>"
?>
<?php
include "class.php";
$report__current_week__year = "2019";
$report__current_week__week = "46";
$reportDate = new getDateInfo($report__current_week__year, $report__current_week__week);
$reportDate->dateInfo();
?>
<p><?php echo $reportDate->get_fullDate(); ?></p>