Fix domain expiry labels - #25886
Open
crazytonyli wants to merge 3 commits into
Open
Conversation
The all-domains endpoint sends expiry as a midnight UTC timestamp, but the app formatted it in the device timezone, printing the previous day in any timezone west of UTC. Format it in UTC so the date always matches the registry's calendar date. Replace the "Renews" label with "Expires on": the date is the end of the registration term, not the auto-renew charge date, which happens about a month earlier and is not available on this endpoint. The expiry line is built with a positional format string so translators can place the date where their language requires. The expired variant gets a new string key: reusing the existing key with a new format value would let stale translations without the placeholder drop the date silently. Fixes CMM-2222 on the iOS side.
Show "Never expires" only for free wordpress.com subdomains, the one case where it is true. For other domains a missing expiry means the date is unknown (registered elsewhere) or does not apply (subdomains), so omit the expiry line instead of making an incorrect claim. Fixes CMM-2223.
crazytonyli
commented
Aug 10, 2026
| } | ||
| let expired = date < Date() | ||
| let notice = expired ? Strings.expired : Strings.renews | ||
| let format = expired ? Strings.expired : Strings.expiresOn |
Contributor
Author
There was a problem hiding this comment.
The date shown is "Renewal" date, not "Expire date".
crazytonyli
commented
Aug 10, 2026
| // addresses) genuinely never expire. For other domains a missing | ||
| // expiry means the date is unknown (registered elsewhere) or | ||
| // doesn't apply (subdomains), so show nothing. | ||
| return domain.type == .wpCom ? Strings.neverExpires : nil |
Contributor
Author
There was a problem hiding this comment.
This fixes the incorrect "Never expires" label.
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33679 | |
| Version | PR #25886 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | b0a7ece | |
| Installation URL | 0gsrqclsjdm80 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33679 | |
| Version | PR #25886 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | b0a7ece | |
| Installation URL | 2sdqqqsctucno |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Fixes https://linear.app/a8c/issue/CMM-2222 and https://linear.app/a8c/issue/CMM-2223.