Skip to content

Return '0 days' instead of '' from PrintDateDelta - #22

Merged
siimav merged 1 commit into
KSP-RO:masterfrom
sparr:fix-empty-date-delta
Oct 10, 2026
Merged

siimav merged 1 commit into
KSP-RO:masterfrom
sparr:fix-empty-date-delta

Conversation

@sparr

@sparr sparr commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Currently if you ask PrintDateDelta for just-days-no-time and give it a duration less than one day, it returns an empty string. This PR changes that to "0 days", matching the behavior of PrintDateDeltaCompact's "0d". Ditto for times less than 60 seconds producing "0 minutes" instead of an empty string.

I noticed this bug in RP-1's "warp to fund target" interface for short warps.

AI Disclosure Claude Opus 5.5 was used to trace the root cause of the RP-1 interface problem that I noticed.

@Clayell

Clayell commented Oct 9, 2026 •

Copy link
Copy Markdown

Should fix KSP-RO/RP-1#2934

@siimav siimav changed the title Return "0 days" instead of "" from PrintDateDelta Return '0 days' instead of '' from PrintDateDelta Oct 10, 2026
@siimav
siimav merged commit d7c77a3 into KSP-RO:master Oct 10, 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.

3 participants