flux-querybuilder/src/Type/TimeType.php

15 lines
308 B
PHP
Raw Normal View History

<?php
2024-03-30 16:44:38 +01:00
namespace Hosterra\FluxBuilder\Type;
use DateTime;
2024-03-30 16:44:38 +01:00
class TimeType implements TypeInterface {
public function __construct( DateTime $dateTime ) {
$this->dateTime = $dateTime;
}
2024-03-30 16:44:38 +01:00
public function __toString(): string {
return 'time(v: ' . $this->dateTime->format( 'Y-m-d\TH:i:s\Z' ) . ')';
}
}