Merge pull request #7978 from josectello/fix/advanced_bonfires_wording

Adjusting wording in "Friendly Date Ranges" bonfire
pull/18182/head
Eric Leung 2016-04-09 23:09:16 -07:00
commit 61f738492f
1 changed files with 3 additions and 2 deletions

View File

@ -265,8 +265,9 @@
"description": [
"Convert a date range consisting of two dates formatted as <code>YYYY-MM-DD</code> into a more readable format.",
"The friendly display should use month names instead of numbers and ordinal dates instead of cardinal (<code>1st</code> instead of <code>1</code>).",
"Do not display information that is redundant or that can be inferred by the user: if the date range ends in less than a year from when it begins, do not display the ending year. If the range ends in the same month that it begins, do not display the ending year or month.",
"Additionally, if the date range begins in the current year and ends within one year, the year should not be displayed at the beginning of the friendly range.",
"Do not display information that is redundant or that can be inferred by the user: if the date range ends in <em>less than a year</em> from when it begins, do not display the <em>ending year</em>.",
"Additionally, if the date range begins in the <em>current year</em> and ends within one year, the year should not be displayed at the <em>beginning</em> of the friendly range.",
"If the range ends in the <em>same month</em> that it begins, do not display the <em>ending year or month</em>.",
"Examples:",
"<code>makeFriendlyDates([\"2016-07-01\", \"2016-07-04\"])</code> should return <code>[\"July 1st\",\"4th\"]</code>",
"<code>makeFriendlyDates([\"2016-07-01\", \"2018-07-04\"])</code> should return <code>[\"July 1st, 2016\", \"July 4th, 2018\"]</code>.",