LanguageValues and typesStandard typesMoney and banking
CardExpiry
On this page
The month a payment card runs to, written 2028-12.
Use it beside a card's details on a payment form. For any other month, use YearMonth.
Shape
| Field | Type | Required? |
|---|---|---|
year |
Int |
Yes |
month |
Int |
Yes |
Example
CardExpiry { year: 2028 month: 12 }text.parse(raw, as: CardExpiry) reads one from text that comes from outside. Text that isn't one at all fails malformed, such as 12/28, 2028-13 or 2028-00.
Good to know
text.formatshows it as a card prints it,12/28, buttext.parsereads only2028-12.- The card is good until the end of that month.
==tells you whether two are the same, and<andlist.sort_bycompare and sort them.- A field that holds one counts as personal data (
financial), so you don't mark it yourself.
In JSON
A string, in a request, a response or json.write:
"2026-12""2028-01"
Details
Text form, storage, how it is shown, and operations
CardExpiry is in the group Money and banking, and has been in Jadpo since 0.1.0.
Text form
text.from writes one standard text form, the same form text.parse reads back: 2026-12 and 2028-01.
How it is stored
It is stored in 2 columns, each named for the field, _ and its suffix. This is 2028-01:
| Column | Type | Holds |
|---|---|---|
<field>_year |
integer |
2028 |
<field>_month |
integer |
1 |
How it is shown to people
text.format(value, locale:) shows it to people in their locale.
With locale: Locale.en_gb:
| Value | Shown |
|---|---|
2026-12 |
12/26 |
2028-01 |
01/28 |
Operations
It also takes text.parse, text.from, text.format, json.read, json.write and ==. How every standard type behaves says how they work.
Markdown for agents: /docs/types/type-card-expiry.md.Built from Jadpo main at aee2e8f.