Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions src/client/datascience/notebook/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ export class NotebookSurveyBanner {
if (!this.enabled || this.disabledInCurrentSession) {
return false;
}
const currentDate = new Date();
if (currentDate.getMonth() < 7) {
Comment thread
DonJayamanne marked this conversation as resolved.
Outdated
return false;
}

const data = this.persistentState.createGlobalPersistentState<NotebookSurveyUsageData>(storageKey, {});

const totalActionsInPreviousSessions =
Expand Down
1 change: 1 addition & 0 deletions src/test/datascience/notebook/survey.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ suite('Data Science - NativeNotebook Survey', () => {
shell = mock<IApplicationShell>();
browser = mock<IBrowserService>();
clock = fakeTimers.install();
clock.setSystemTime(new Date(2020, 7, 1)); // Survey will work only after 1st August.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

August is the 8th month.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

months are 0 based indices in dates. (did mention that earlier when this was brought up #12961 (comment))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I assume that means days too.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No, days are not, start from 1

});
async function loadAndActivateExtension() {
const surveyBanner = new NotebookSurveyBanner(instance(shell), instance(stateFactory), instance(browser));
Expand Down