Skip to content

Add README docs for TimeSpan#8

Closed
pageantry wants to merge 4 commits intothesis-php:0.2.xfrom
pageantry:documentation/readme.md
Closed

Add README docs for TimeSpan#8
pageantry wants to merge 4 commits intothesis-php:0.2.xfrom
pageantry:documentation/readme.md

Conversation

@pageantry
Copy link
Copy Markdown
Contributor

@pageantry pageantry commented May 18, 2025

Resolve #3

@pageantry pageantry changed the title Resolve thesis-php/time-span#3 Add README docs for TimeSpan May 19, 2025
@pageantry pageantry marked this pull request as draft June 6, 2025 12:26
@pageantry pageantry marked this pull request as ready for review November 28, 2025 14:31
README.md Outdated
You can create a `TimeSpan` instance using various static factory methods depending on your source unit.

```php
use YourVendor\TimeSpan;
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.

Suggested change
use YourVendor\TimeSpan;
use Thesis\TimeSpan;


### ⚠️ Important: Nanoseconds and IEEE 754

The core method `TimeSpan::fromNanoseconds(int|float $nanoseconds)` accepts both integers and floating-point numbers. However, users must be aware of **IEEE 754 floating-point limitations**.
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.

Can we use bcmath to resolve this issue?

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.

Well, the question is whether we need that really here...

@vudaltsov
Copy link
Copy Markdown
Contributor

Thank you, guys! Based on this + a lot of other changes I've created an alternative commit: 9128ef8

@vudaltsov vudaltsov closed this Apr 2, 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.

Add README docs for TimeSpan

4 participants