Skip to content

Update activityTimeline.js#66

Open
mchakotay wants to merge 1 commit intoSalesforceLabs:masterfrom
mchakotay:patch-1
Open

Update activityTimeline.js#66
mchakotay wants to merge 1 commit intoSalesforceLabs:masterfrom
mchakotay:patch-1

Conversation

@mchakotay
Copy link

This is a fix for Month headers not displaying properly. If you are in a different timezone than the org you are logging into, Intl.DateTimeFormat(.....) will add or subtract X hours from monthItem.firstOfMonth, where X is UTC-X. The result is that when we are setting month value for the header, the formatted value is January 31st instead of February 1st, for instance. There are several instances where this is happening in the file, but this is the most obvious and glaring one I tackled first. By creating a local date, and using that value instead we ensure the date displays properly.

This is a fix for Month headers not displaying properly.  If you are in a different timezone than the org you are logging into, Intl.DateTimeFormat(.....) will add or subtract X hours from monthItem.firstOfMonth, where X is UTC-X. The result is that when we are setting month value for the header, the formatted value is January 31st instead of February 1st, for instance. There are several instances where this is happening in the file, but this is the most obvious and glaring one I tackled first. By creating a local date, and using that value instead we ensure the date displays properly.
@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @mchakotay to sign the Salesforce Inc. Contributor License Agreement.

@mchakotay
Copy link
Author

Signed the salesforce-CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant