Skip to content

Conversation

@crisbeto
Copy link
Member

Fixes a couple of issues I noticed while doing the Luxon adapter:

  • If a Moment instance was passed in to deserialize, we were returning a new Moment instance set to the current date/time, rather than the ones from the passed-in object.
  • In some cases the object returned by deserialize didn't have its locale set to the one from the adapter.

…etting locale on deserialized values

Fixes a couple of issues I noticed while doing the Luxon adapter:
* If a `Moment` instance was passed in to `deserialize`, we were returning a new `Moment` instance set to the current date/time, rather than the ones from the passed-in object.
* In some cases the object returned by `deserialize` didn't have its locale set to the one from the adapter.
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Dec 31, 2018
@crisbeto crisbeto requested a review from mmalerba as a code owner December 31, 2018 07:27
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 31, 2018
@mmalerba mmalerba added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Jan 2, 2019
@mmalerba
Copy link
Contributor

mmalerba commented Jan 3, 2019

merge safe since we don't sync moment adapter into google3

@mmalerba mmalerba merged commit 36db1c0 into angular:master Jan 3, 2019
josephperrott pushed a commit to josephperrott/components that referenced this pull request Jan 14, 2019
…etting locale on deserialized values (angular#14685)

Fixes a couple of issues I noticed while doing the Luxon adapter:
* If a `Moment` instance was passed in to `deserialize`, we were returning a new `Moment` instance set to the current date/time, rather than the ones from the passed-in object.
* In some cases the object returned by `deserialize` didn't have its locale set to the one from the adapter.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants