-
Notifications
You must be signed in to change notification settings - Fork 54
Update Pashto locale date format for LL & LLL #3357
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just forgot to change to PR number in changelog.
['LL', 'فبروري ۱۴، ۲۰۱۰'], | ||
['LLL', 'فبروري ۱۴، ۲۰۱۰ ۳:۲۵ PM'], | ||
['LL', '۱۴ فبروري ۲۰۱۰'], | ||
['LLL', '۱۴ فبروري ۲۰۱۰ ۱۵:۲۵'], | ||
['D MMMM YYYY', '۱۴ فبروري ۲۰۱۰'], | ||
], | ||
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if it would be worth changing the variable names of just a
and b
here and in the following lines. It's understandable once I actually read into it but not at a glance. Was there any specific reason these were just called letters? If changes are to be made, it doesn't have to be in this PR. Maybe we can talk about it elsewhere first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the lines above there is a comment:
https://github.com/bbc/psammead/pull/3357/files#diff-f346ba0ea5f4f03a852d57caf66d4df3R6
// This asset overrides the gunit assertion done in the moment codebase.
// Format and styling of this file has been keep consistent with the official moment tests.
// An example of these tests can be seen at https://github.com/moment/moment/blob/develop/src/test/locale/en-gb.js
We haven't refactored the test structure, so we can contribute these suggestions back to the Moment codebase, after we believe they're complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from @lokh01 comments, looks good to me 👍
This has been UX approved by Laura. So we can merge it in and review fully in the Simorgh page. |
No ticket.
Currently Pashto
LL
date formats for the Gregorian calendar do not match our desired format.They map to
MMM DD, YYYY
instead ofDD MMM YYYY
.Overall change: The timestamps on Story Promos use the date format
LL
. This was in an incorrect format for Pashto. This PR updates LL & LLL formats.Code changes:
Testing notes - you can see the Diff in Storybook
Before (
MMM DD, YYYY
)After (
DD MMM YYYY
)Can be observed locally in Storybook: http://localhost:8180/?path=/story/utilities-psammead-locales--moment-pashto-ps