Skip to content

Conversation

erenkarakal
Copy link
Member

Problem

Having to write unnecessary code to get the timespan arithmetic operation, just for simple additions and subtractions.

Solution

Moves the arithmetic code inside the Timespan class so that the methods can be used quickly.

Testing Completed

Manual testing was done to ensure that overflowing and underflowing are properly handled and that simple operations work fine. No code was changed, only moved around.

Supporting Information

This was discussed in the dev channel


Completes: none
Related: none

@erenkarakal erenkarakal requested a review from a team as a code owner May 20, 2025 16:48
@erenkarakal erenkarakal requested review from cheeezburga and UnderscoreTud and removed request for a team May 20, 2025 16:48
@erenkarakal erenkarakal added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label May 20, 2025
@skriptlang-automation skriptlang-automation bot added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label May 21, 2025
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

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

Seems fine. Is there any particular reason why you use a millis variable in add and subtract but not difference?

@erenkarakal
Copy link
Member Author

Seems fine. Is there any particular reason why you use a millis variable in add and subtract but not difference?

Missed it, changing now

@sovdeeth sovdeeth merged commit 69702c9 into SkriptLang:dev/patch May 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants