Skip to content

#9 implement math methods for TimeSpan#14

Merged
vudaltsov merged 2 commits intothesis-php:0.2.xfrom
Evgymart:issue-9
May 28, 2025
Merged

#9 implement math methods for TimeSpan#14
vudaltsov merged 2 commits intothesis-php:0.2.xfrom
Evgymart:issue-9

Conversation

@Evgymart
Copy link
Copy Markdown
Contributor

No description provided.

src/TimeSpan.php Outdated
return $this->nanoseconds >= $another->nanoseconds;
}

public function isZero(): bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use order <0, <=0, 0, >=0, >0

public function testAbs(int $microseconds, int $expectedMicroseconds): void
{
$span = TimeSpan::fromMicroseconds($microseconds);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AAA

@vudaltsov vudaltsov merged commit ceda2af into thesis-php:0.2.x May 28, 2025
22 checks passed
@vudaltsov vudaltsov mentioned this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants