<?php

namespace App\Services;

use Carbon\Carbon;
use Thepixeldeveloper\Sitemap\Url;
use DateTimeInterface;

class SitemapUrl extends Url
{

    public $lastMod;

    public function setLastMod(DateTimeInterface $lastMod)
    {
        $this->lastMod = $lastMod;
    }

    public function getLastMod()
    {
        return Carbon::parse($this->lastMod)->format('Y-m-d');
    }
}