Skip to content

Document the date contact property type and the segment date ops - #14

Merged
heliocosta-dev merged 1 commit into
mainfrom
feat/date-property-type
Oct 21, 2026
Merged

heliocosta-dev merged 1 commit into
mainfrom
feat/date-property-type

Conversation

@heliocosta-dev

Copy link
Copy Markdown
Member

MillionSend v0.22.0 adds a third contact property type, date, next to string and number. It is a MillionSend extension, since Resend has only the two. This brings the docs in line; no code changes.

  • ContactProperties docblock and README → Contact properties: the type is string, number or date. A date property's values and its fallback_value must read as a date, or the write answers 422 validation_error. What reads as a date:
    • YYYY-MM-DD, read as midnight UTC;
    • a date-time with T or a space, read as UTC when it names no zone;
    • Unix time in seconds or milliseconds between 2000-01-01 and 2100-01-01.
  • README → Contact properties also says contacts->get() returns each property as ['type' => …, 'value' => …], with a date's stored text as its value, and adds a create() example with 'type' => 'date'.
  • README → Segments: created_at and property:<key> take four date ops. before and after take an ISO date or date-time. in_last_days and not_in_last_days take a whole number of days as a string, from '1' to '36500'.
  • README → compatibility notes: the date type is listed among the MillionSend extensions.
  • Both README paragraphs end with what servers before v0.22.0 do.

Runtime behavior doesn't change. create()'s param shape types type as string, and responses are json_decode(…, true) arrays, so a "type": "date" reads like any other. It's docs only, so there's no version bump and nothing to tag.

Checked in php:8.4-cli the way CI does: composer install, Pest (94 passed, 2 E2E skipped), Pint and PHPStan level 8 (no errors).

🤖 Generated with Claude Code

- ContactProperties' docblock and the README's Contact properties section
  name the third type, date (a MillionSend extension), and what reads as a
  date: YYYY-MM-DD as midnight UTC, a date-time with T or a space (UTC when
  it names no zone), or Unix time in seconds or milliseconds between
  2000-01-01 and 2100-01-01. A value or fallback_value that doesn't answers
  422 validation_error, and contacts->get() returns a date's stored text.
- The Segments section names the date ops on created_at and
  property:<key>: before and after take an ISO date or date-time,
  in_last_days and not_in_last_days a whole number of days from '1' to
  '36500'.
- The Resend compatibility notes list the date type among the extensions.

The param shape keeps type: string and responses stay plain arrays, so
nothing changes at runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@heliocosta-dev
heliocosta-dev merged commit fc8c28a into main Oct 21, 2026
4 checks passed
@heliocosta-dev
heliocosta-dev deleted the feat/date-property-type branch October 21, 2026 21:15
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.

1 participant