# GS1 AI (17) Expiration Date Specification (YYMMDD & YYMM00)
> Parse GS1 expiration date timestamps into ISO 8601 dates with full support for YYMM00 end-of-month logic.

- **Canonical URL:** https://stanzaapi.com/tools/gs1-decoder/ai/17-expiration-date
- **Governing Standard:** GS1 General Specifications & AI Syntax (GS1 Global Standards Architecture)
- **Latency:** <1ms Edge
- **Privacy:** In-memory execution only (zero data stored or logged)

## Technical Overview & Governing Rules
AI (17) defines the expiration date in 6 numeric digits (YYMMDD). If the day is unknown, DD is set to 00, indicating the last day of that month.

## Specification Matrix
| Raw String | Interpretation | Resolved ISO Date |
| --- | --- | --- |
| 260831 | August 31, 2026 | 2026-08-31 |
| 260200 | Last day of February 2026 | 2026-02-28 |

## Standard JSON Response Model
```json
{
  "ai": "17",
  "raw": "260831",
  "isoDate": "2026-08-31",
  "isEndOfMonthRule": false
}
```

## Frequently Asked Questions & Edge Cases
### Q: How is century determined in YYMMDD dates?
**A:** Following GS1 standards, years within 50 years forward/backward are resolved to the 21st century.
