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

Add target hours and minutes for 'enter-time' task #1

Merged
merged 1 commit into from
Oct 13, 2023
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
5 changes: 5 additions & 0 deletions miniwob/html/miniwob/enter-time.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
var START_DATE = new Date(2016, 0, 1); // January 1, 2015
var END_DATE = new Date(2016, 11, 31); // December 31, 2016

var TARGET_HOUR = null;
var TARGET_MINUTES = null;

var genProblem = function() {
var d = ui_utils.randomDate(START_DATE, END_DATE);
TARGET_HOUR = d.getHours();
TARGET_MINUTES = d.getMinutes();
d3.select('#tt')[0][0].value = '';

var readableTime = d.toLocaleTimeString().replace(/([\d]+:[\d]{2})(:[\d]{2})(.*)/, '$1$3');
Expand Down
Loading