Skip to content

Commit

Permalink
Merge pull request #19 from pauci/feature/date-interval-interface
Browse files Browse the repository at this point in the history
feat: Introduce DateIntervalInterface
  • Loading branch information
pauci authored Jan 18, 2023
2 parents fe4c0ef + 8c0f802 commit 0e360b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DateInterval.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Pauci\DateTime;

class DateInterval extends \DateInterval implements \JsonSerializable, \Stringable
class DateInterval extends \DateInterval implements DateIntervalInterface
{
/**
* @throws \Exception
Expand Down
10 changes: 10 additions & 0 deletions src/DateIntervalInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

namespace Pauci\DateTime;

interface DateIntervalInterface extends \Stringable, \JsonSerializable
{
public function toString(): string;
}
2 changes: 0 additions & 2 deletions src/DateTimeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

interface DateTimeInterface extends \DateTimeInterface, \Stringable, \JsonSerializable
{
public function diff(\DateTimeInterface $targetObject, bool $absolute = false): DateInterval;

public function equals(self $dateTime): bool;

public function inDefaultTimezone(): static;
Expand Down

0 comments on commit 0e360b8

Please sign in to comment.