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

Account for 0-based UTCMonth rendering #2219

Merged
merged 1 commit into from
Sep 4, 2017
Merged

Conversation

mmcfarland
Copy link
Contributor

@mmcfarland mmcfarland commented Sep 1, 2017

Overview

The getUTCMonth method returns a month number from 0-11, so it is adjusted for readability in display by adding 1. UTCDate and UTCFullYear are not 0 based and so are left unchanged.

Connects #2142

Demo

screenshot from 2017-09-01 09 53 05

Notes

The issue states that both UTCMonth and UTCDate are zero-based, but the documentation says otherwise:

dateObj.getUTCDate()
Return value
An integer number, between 1 and 31, representing the day of the month in the given date according to universal time.

So that was not adjusted.

Testing Instructions

  • Bundle and do a ?bigcz=true search for Water around Philadelphia.
  • Activate the WDC tab and ensure that there are no 0 based days or months, as illustrated in the connected issue.

The `getUTCMonth` method returns a month number from 0-11, so it is
adjusted for readability in display by adding 1.  UTCDate and
UTCFullYear are not 0 based and so are left unchanged.
Copy link
Contributor

@kellyi kellyi left a comment

Choose a reason for hiding this comment

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

+1. Tested this out and I don't see any months with values of 0 or 13 in the WDC results.

@kellyi kellyi assigned mmcfarland and unassigned kellyi Sep 1, 2017
@mmcfarland mmcfarland merged commit 03d8b93 into develop Sep 4, 2017
@mmcfarland mmcfarland deleted the mjm/cz-wdc-dates branch September 4, 2017 11:49
@rajadain rajadain mentioned this pull request Oct 16, 2017
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.

None yet

3 participants