Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(dateparser): change template literal from ' to ` #4938

Closed

Conversation

wesleycho
Copy link
Contributor

  • Changes from ' to ` for template literals
  • Adds documentation about template literals

BREAKING CHANGE: This changes template literals from the single quote
' to the backtick character ``` for more natural usage with certain
strings such as o'clock.

This supercedes #4936 and addresses #4880.

- Changes from ' to ` for template literals
- Adds documentation about template literals

BREAKING CHANGE: This changes template literals from the single quote
`'` to the backtick character `` ` `` for more natural usage with certain
strings such as `o'clock`.
@wesleycho wesleycho force-pushed the feat/dateparser-backtick branch from 35e8296 to 7ae4f4f Compare November 23, 2015 17:48
@@ -140,3 +140,5 @@ Certain format codes support i18n. Check this [guide](https://docs.angularjs.org
\* The ones marked with `Leading 0`, needs a leading 0 for values less than 10. Exception being milliseconds which needs it for values under 100.

\** It also supports `fullDate|longDate|medium|mediumDate|mediumTime|short|shortDate|shortTime` as the format for parsing.

\*** It supports template literals as a string between the backtick `\`` character, i.e. `\`The Date is\` MM/DD/YYYY`. If one wants the literal backtick character, one must use `\`\`\`\``.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand the last part, it ends like ````` or something like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be 4 backticks

Copy link
Contributor

Choose a reason for hiding this comment

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

I added a random bunch in there. But I don't understand why you need 4 to put one literal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has to do with the implementation - probably could use some investigation here as to what is going on, but I am just documenting it.

@Foxandxss
Copy link
Contributor

Good for me then.

@wesleycho wesleycho closed this in 9513f10 Nov 24, 2015
@wesleycho wesleycho deleted the feat/dateparser-backtick branch November 24, 2015 20:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants