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

Deprecate date parse #4396

Merged
merged 3 commits into from
May 25, 2016
Merged

Deprecate date parse #4396

merged 3 commits into from
May 25, 2016

Conversation

bmac
Copy link
Member

@bmac bmac commented May 24, 2016

This pr deprecates overriding Date.parse however it keeps the current behavior (and where it differs from the native date.parse) for the date transform.

This pr supersedes #4231 and #4275

@pangratz
Copy link
Member

LGTM 👍

@bmac bmac merged commit 77dc781 into emberjs:master May 25, 2016
@bmac bmac deleted the deprecate-date-parse branch May 25, 2016 08:37
@rwjblue
Copy link
Member

rwjblue commented May 25, 2016

This makes me very happy, thank you!

@seanmhoffman
Copy link

deprecation id: ds.date.parse-deprecate

I'm going to leave this here in hopes that a web crawler will pick it up. I was pretty confused when I got this deprecation warning and couldn't find reference to the deprecation id anywhere. Keep up the good work 👍

@c0achmcguirk
Copy link

c0achmcguirk commented Sep 6, 2016

When I deprecrated extending dates it broke a lot of my app and my tests. It seemingly stopped extending strings, arrays, and functions.

I expanded the config/environment.js like this and now it works (after restarting server and tests of course).

EmberENV: {
  FEATURES: {
    // Here you can enable experimental features on an ember canary build
    // e.g. 'with-controller': true
  },

  EXTEND_PROTOTYPES: {
    Date: false,
    String: true,
    Array: true,
    Function: true
  }
},

Notice the extra extend lines for String, Array and Function.

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.

6 participants