Problem
SOSO-439 solved locale-aware validation (reading/accepting locale-formatted dates). However, the library currently sends dates in ISO 8601 format when writing (add/update). While AppSheet tolerates this when Properties.Locale is set, there is no active conversion to the locale-specific format.
Proposed Solution
Implement a WriteConversionPolicyInterface (Strategy Pattern) that optionally converts field values to locale-specific formats before sending them to the AppSheet API.
Architecture
- Strategy Pattern analogous to
UnknownFieldPolicyInterface
- Interface:
WriteConversionPolicyInterface with apply() method
- Built-in Implementations:
NoOpWriteConversionPolicy (default, backward-compatible)
LocaleWriteConversionPolicy (converts ISO dates to locale format)
- Injection: Via DynamicTable/DynamicTableFactory constructor
- Write Path:
unknownFieldPolicy → validate → writeConversion → client.add()
Scope
Phase 1: Date, DateTime, ChangeTimestamp fields
Phase 2 (future): Percent, Price, Time, Duration (requires API research)
Key Decisions
- Strategy Pattern over simple flag — consistent with existing architecture, extensible
- Conversion happens after validation — ensures only valid values are converted
- Default is NoOp — no breaking change, explicit opt-in required
- Builds on
getLocaleDateFormat() from SOSO-439 for conversion logic
Related
- Follows from SOSO-439 (locale-aware validation)
- Uses architectural patterns from SOSO-435 (UnknownFieldPolicyInterface)
Problem
SOSO-439 solved locale-aware validation (reading/accepting locale-formatted dates). However, the library currently sends dates in ISO 8601 format when writing (add/update). While AppSheet tolerates this when
Properties.Localeis set, there is no active conversion to the locale-specific format.Proposed Solution
Implement a WriteConversionPolicyInterface (Strategy Pattern) that optionally converts field values to locale-specific formats before sending them to the AppSheet API.
Architecture
UnknownFieldPolicyInterfaceWriteConversionPolicyInterfacewithapply()methodNoOpWriteConversionPolicy(default, backward-compatible)LocaleWriteConversionPolicy(converts ISO dates to locale format)unknownFieldPolicy → validate → writeConversion → client.add()Scope
Phase 1: Date, DateTime, ChangeTimestamp fields
Phase 2 (future): Percent, Price, Time, Duration (requires API research)
Key Decisions
getLocaleDateFormat()from SOSO-439 for conversion logicRelated