Skip to content

Commit

Permalink
Add target hours and minutes for 'enter-time' task
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-berariu authored and mcobzarenco committed Oct 13, 2023
1 parent fb72eed commit 6ca95b1
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 6ca95b1

Please sign in to comment.