// from https://i...content-available-to-author-only...e.com/TaR29j /* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; import java.util.Date; import java.text.SimpleDateFormat; import java.text.*; /* Name of the class has to be "Main" only if the class is public. */ class TimeSheet { { //Scanner myObj = new Scanner(System.in); // Create a Scanner object Scanner myObj = new Scanner(System.in); // use myObj so you don't have to change it if you choose to use hard-wired inputs // https://w...content-available-to-author-only...t.com/how-to-format-date-using-printf-method-in-java // https://stackoverflow.com/posts/39066917/revisions System.out.println("From \"https://c...content-available-to-author-only...e.com/pwm/action/mobileGetTimesheetPunches\""); //stackoverflow/questions/2296685/how-to-read-input-with-multiple-lines-in-java //stackoverflow/questions/56887493/how-to-take-multi-line-input-in-java search:HashmatWarrior while(myObj.hasNext()) { String hours; if(!gottaFix.isEmpty()) { if(gottaFix.contains("Punches:")) { dateString = gottaFix.split(": "); dateObj = sdf.parse(dateString[1]); /*System.out.printf("Date: %td%n", dateObj); System.out.printf("Month: %tm%n", dateObj); System.out.printf("Year: %ty%n", dateObj); System.out.printf("getTime(): "+dateObj);*/ } else if(gottaFix.contains("M")) { punch = gottaFix.split("\t"); if(punch[0].equals("ES")) { if(punch[1].equals("Edited")) else } } } //else { } } } }
Punches: Sun Dec 8, 2024 Type Store Status Time Hrs SS 03660 Normal 4:30 PM 3:53 SB 03660 Normal 8:23 PM 0:16 EB 03660 Normal 8:39 PM 0:50 ES 03660 Normal 9:29 PM Punches: Tue Dec 10, 2024 Type Store Status Time Hrs SS 03660 Normal 10:06 PM 7:49 Punches: Wed Dec 11, 2024 Type Store Status Time Hrs SB 03660 Added 5:55 AM 0:10 EB 03660 Normal 6:05 AM 0:09 ES 03660 Normal 6:14 AM SS 03660 Normal 10:16 PM 2:33 Punches: Thu Dec 12, 2024 Type Store Status Time Hrs SB 03660 Normal 12:49 AM 0:10 EB 03660 Normal 12:59 AM 4:34 SM 03660 Normal 5:33 AM EM 03660 Normal 6:03 AM 0:07 ES 03660 Normal 6:10 AM SS 03660 Normal 9:11 PM 6:07 Punches: Fri Dec 13, 2024 Type Store Status Time Hrs ES 03660 Normal 3:18 AM Punches: Sat Dec 14, 2024 Type Store Status Time Hrs SS 03660 Normal 7:12 PM 3:09 SB 03660 Normal 10:21 PM 0:12 EB 03660 Normal 10:33 PM 0:44 ES 03660 Normal 11:17 PM
From "https://c...content-available-to-author-only...e.com/pwm/action/mobileGetTimesheetPunches" Sun 12/8, scheduledTime, 4:30, 8:23, 8:39, 9:29, no bank run; Tue 12/10, scheduledTime, 10:06Wed 12/11, scheduledTime, 5:55, 6:05, 6:14, no bank run; , 10:16Thu 12/12, scheduledTime, 12:49, 12:59, 5:33, 6:03, 6:10, no bank run; , 9:11Fri 12/13, scheduledTime, 3:18, no bank run; Sat 12/14, scheduledTime, 7:12, 10:21, 10:33, 11:17, no bank run;