Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Add Date type converters #26148

Merged
merged 3 commits into from
Jan 4, 2024
Merged

Conversation

alanjhughes
Copy link
Collaborator

Why

Add converters to parse Date arguments. Can convert from a ISO 8601 formatted string or from an epoch value.

How

  • Added Convertible conformance to Date on iOS
  • Added type converter on Android that converts to a LocalDate

Test Plan

Added new tests

@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Dec 27, 2023
@alanjhughes alanjhughes marked this pull request as ready for review December 28, 2023 00:23
Copy link
Member

@tsapeta tsapeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How the JS test would look like? Would be good to support passing a JS Date object too 🤔

@alanjhughes alanjhughes force-pushed the @alanhughes/core/date-converters branch from e8da9a8 to ad42520 Compare January 4, 2024 10:42
@lukmccall
Copy link
Contributor

How the JS test would look like? Would be good to support passing a JS Date object too 🤔

Right now, it supports ints or strings. We can add support for JS Date object later - it'll require more changes on the Cpp side.

@alanjhughes alanjhughes merged commit 912c2df into main Jan 4, 2024
13 checks passed
@alanjhughes alanjhughes deleted the @alanhughes/core/date-converters branch January 4, 2024 14:06
alanjhughes added a commit that referenced this pull request Jan 10, 2024
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Jan 10, 2024
onizam95 pushed a commit to onizam95/expo-av-drm that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants