Skip to content

Fix domain expiry labels - #25886

Open
crazytonyli wants to merge 3 commits into
trunkfrom
cmm-2222-2223-domain-expiry-labels
Open

Fix domain expiry labels#25886
crazytonyli wants to merge 3 commits into
trunkfrom
cmm-2222-2223-domain-expiry-labels

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

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.
}
let expired = date < Date()
let notice = expired ? Strings.expired : Strings.renews
let format = expired ? Strings.expired : Strings.expiresOn

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The date shown is "Renewal" date, not "Expire date".

// 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This fixes the incorrect "Never expires" label.

@crazytonyli
crazytonyli requested a review from jkmassel August 10, 2026 03:37
@crazytonyli crazytonyli added this to the 27.2 milestone Aug 10, 2026
@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number33679
VersionPR #25886
Bundle IDorg.wordpress.alpha
Commitb0a7ece
Installation URL0gsrqclsjdm80
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number33679
VersionPR #25886
Bundle IDcom.jetpack.alpha
Commitb0a7ece
Installation URL2sdqqqsctucno
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants