Skip to content

Conversation

@davidperezgar
Copy link
Contributor

Add date normalization for Clientify API's birthday field to support various input formats.


Open in Cursor Open in Web

Fixes #143. The Clientify API requires birthday dates in YYYY-MM-DD
format. This change adds a centralized helper function to normalize
various date formats and applies it to the birthday field before
sending to the API.

Supported input formats:
- European: dd/mm/yyyy, dd-mm-yyyy, dd.mm.yyyy
- ISO: yyyy-mm-dd, yyyy/mm/dd
- US format detection when day > 12
- Unix timestamps
- Text formats via strtotime fallback

Includes comprehensive unit tests for date format conversions.

Co-authored-by: david <david@closemarketing.es>
@cursor
Copy link

cursor bot commented Jan 14, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@davidperezgar davidperezgar marked this pull request as ready for review January 19, 2026 11:35
@davidperezgar davidperezgar merged commit dbe0f37 into trunk Jan 20, 2026
6 checks passed
@davidperezgar davidperezgar deleted the cursor/date-format-conversions-4c9b branch January 20, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants