Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/values/TimeValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ SELF.getCalendarModelKeyByUri = function( uri ) {
* @since 0.7
*/
SELF.PRECISIONS = [
{ id: 'GY', text: 'billion years' },
{ id: 'MY100', text: 'hundred million years' },
{ id: 'MY10', text: 'ten million years' },
{ id: 'MY', text: 'million years' },
{ id: 'KY100', text: '100,000 years' },
{ id: 'KY10', text: '10,000 years' },
{ id: 'KY', text: 'millenium' },
{ id: 'YEAR1G', text: 'billion years' },
{ id: 'YEAR100M', text: 'hundred million years' },
{ id: 'YEAR10M', text: 'ten million years' },
{ id: 'YEAR1M', text: 'million years' },
{ id: 'YEAR100K', text: '100,000 years' },
{ id: 'YEAR10K', text: '10,000 years' },
{ id: 'YEAR1K', text: 'millenium' },
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these not used anywhere? Also, is this change consistent with what we have in PHP?

And finally, is this really better? Sure, it's the same format, though is it how those things are normally written? I suspect not, which is supported by http://en.wiktionary.org/wiki/Gyr

+0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently these JavaScript constants are not used anywhere. They were just introduced in the unreleased 0.7.0.

PHP constants are named different, see https://gerrit.wikimedia.org/r/#/c/194306/. This is the main reason why I touch this: 1. PHP constants use lower (!) case characters. 2. PHP and JavaScript constants are named differently.

If there is a better naming scheme, I'm open for suggestions.

{ id: 'YEAR100', text: 'century' },
{ id: 'YEAR10', text: 'decade' },
{ id: 'YEAR', text: 'year' },
Expand Down