Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Support more search space and maxDuration format #190

Merged
merged 4 commits into from
Oct 11, 2018
Merged

Support more search space and maxDuration format #190

merged 4 commits into from
Oct 11, 2018

Conversation

lvybriage
Copy link
Contributor

support more search space;
change maxDuration and still running style.

@@ -88,6 +88,20 @@ class Sessionpro extends React.Component<{}, SessionState> {
};
}

convertTime = (num: number) => {
let hour = Math.floor(num / 3600 % 24);
Copy link
Contributor

Choose a reason for hiding this comment

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

why mod 24 here? it seems there is no day unit here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

} else {
return result = hour + 'h ' + min + 'min';
}
}
Copy link
Contributor

@chicm-ms chicm-ms Oct 10, 2018

Choose a reason for hiding this comment

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

This function can be simplified as following:
const hour = Math.floor(num / 3600);
const min = Math.floor(num / 60 % 60);
return hour > 0 ? `${hour} h ${min} min` : `${min} min`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks very much.

@chicm-ms chicm-ms merged commit 04e79ad into microsoft:master Oct 11, 2018
@lvybriage lvybriage deleted the lijiao branch October 11, 2018 09:11
suiguoxin pushed a commit that referenced this pull request Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants