fork download
  1. // from https://i...content-available-to-author-only...e.com/TaR29j
  2. /* package whatever; // don't place package name! */
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. import java.util.Date;
  7. import java.text.SimpleDateFormat;
  8. import java.text.*;
  9.  
  10. /* Name of the class has to be "Main" only if the class is public. */
  11. class TimeSheet
  12. {
  13. public static void main (String[] args) throws java.lang.Exception
  14. {
  15. //Scanner myObj = new Scanner(System.in); // Create a Scanner object
  16.  
  17. Scanner myObj = new Scanner(System.in); // use myObj so you don't have to change it if you choose to use hard-wired inputs
  18.  
  19. // https://w...content-available-to-author-only...t.com/how-to-format-date-using-printf-method-in-java
  20. Date dateObj = new Date();
  21.  
  22. // https://stackoverflow.com/posts/39066917/revisions
  23. SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM d, yyyy");
  24.  
  25. System.out.println("From \"https://c...content-available-to-author-only...e.com/pwm/action/mobileGetTimesheetPunches\"");
  26.  
  27. //stackoverflow/questions/2296685/how-to-read-input-with-multiple-lines-in-java
  28. //stackoverflow/questions/56887493/how-to-take-multi-line-input-in-java search:HashmatWarrior
  29. while(myObj.hasNext())
  30. {
  31. String gottaFix = myObj.nextLine();
  32. String[] dateString = new String[2];
  33. String header = "Type Status Time Hours";
  34. String hours;
  35. String[] punch = new String[4];
  36.  
  37. if(!gottaFix.isEmpty())
  38. {
  39. if(gottaFix.contains("Punches:"))
  40. {
  41. dateString = gottaFix.split(": ");
  42. dateObj = sdf.parse(dateString[1]);
  43.  
  44. System.out.printf("%ta", dateObj); // Sun
  45. System.out.printf(" %tm", dateObj); // date
  46. System.out.printf("/%te", dateObj); // date
  47.  
  48. System.out.print(", scheduledTime");
  49.  
  50. /*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);*/
  51. }
  52.  
  53. else if(gottaFix.contains("M"))
  54. {
  55. punch = gottaFix.split("\t");
  56. System.out.print(", ");
  57. System.out.print(punch[3].replaceAll(" \\DM", ""));
  58.  
  59. if(punch[0].equals("ES"))
  60. {
  61. if(punch[1].equals("Edited"))
  62. { System.out.println("/, (bank run); ");}
  63. else
  64. { System.out.println(", no bank run; ");}
  65. }
  66. }
  67. }
  68.  
  69. //else
  70. {
  71.  
  72. }
  73. }
  74. }
  75. }
Success #stdin #stdout 0.55s 62276KB
stdin
Punches: Sun Nov 2, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	4:37 PM	4:45
SB	03660	Normal	9:22 PM	0:12
EB	03660	Normal	9:34 PM	0:43
ES	03660	Normal	10:17 PM	
Punches: Mon Nov 3, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:39 PM	3:45
SB	03660	Normal	9:24 PM	0:10
EB	03660	Added	9:34 PM	0:55
ES	03660	Normal	10:29 PM	
Punches: Tue Nov 4, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	4:50 PM	4:35
SB	03660	Normal	9:25 PM	0:11
EB	03660	Normal	9:36 PM	0:52
ES	03660	Normal	10:28 PM	
Punches: Fri Nov 7, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:38 PM	4:25
SB	03660	Normal	10:03 PM	0:11
EB	03660	Normal	10:14 PM	0:23
ES	03660	Normal	10:37 PM	
Punches: Sat Nov 8, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:32 PM	4:31
SB	03660	Normal	10:03 PM	0:11
EB	03660	Normal	10:14 PM	0:13
ES	03660	Normal	10:27 PM	
Punches: Sun Nov 9, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	4:36 PM	4:57
SB	03660	Normal	9:33 PM	0:12
EB	03660	Normal	9:45 PM	0:29
ES	03660	Normal	10:14 PM	
Punches: Mon Nov 10, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:27 PM	4:07
SB	03660	Normal	9:34 PM	0:10
EB	03660	Added	9:44 PM	0:43
ES	03660	Normal	10:27 PM	
Punches: Tue Nov 11, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:18 PM	4:00
SB	03660	Normal	9:18 PM	0:17
EB	03660	Normal	9:35 PM	0:52
ES	03660	Normal	10:27 PM	
Punches: Fri Nov 14, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:31 PM	4:24
SB	03660	Normal	9:55 PM	0:14
EB	03660	Normal	10:09 PM	0:27
ES	03660	Normal	10:36 PM	
Punches: Sat Nov 15, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:26 PM	4:36
SB	03660	Normal	10:02 PM	0:18
EB	03660	Normal	10:20 PM	0:19
ES	03660	Normal	10:39 PM	
Punches: Sun Nov 16, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	4:44 PM	5:07
SB	03660	Added	9:51 PM	0:10
EB	03660	Normal	10:01 PM	0:14
ES	03660	Normal	10:15 PM	
Punches: Mon Nov 17, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:41 PM	3:41
SB	03660	Normal	9:22 PM	0:10
EB	03660	Added	9:32 PM	0:54
ES	03660	Normal	10:26 PM	
Punches: Tue Nov 18, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:17 PM	4:30
SB	03660	Normal	9:47 PM	0:14
EB	03660	Normal	10:01 PM	0:31
ES	03660	Normal	10:32 PM	
Punches: Fri Nov 21, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:32 PM	4:36
SB	03660	Normal	10:08 PM	0:10
EB	03660	Added	10:18 PM	0:59
ES	03660	Normal	11:17 PM	
Punches: Sat Nov 22, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:26 PM	4:39
SB	03660	Normal	10:05 PM	0:12
EB	03660	Normal	10:17 PM	0:30
ES	03660	Normal	10:47 PM	
Punches: Sun Nov 23, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	3:57 PM	6:05
SB	03660	Normal	10:02 PM	0:11
EB	03660	Normal	10:13 PM	0:13
ES	03660	Normal	10:26 PM	
Punches: Mon Nov 24, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:36 PM	4:24
SB	03660	Normal	10:00 PM	0:12
EB	03660	Normal	10:12 PM	0:28
ES	03660	Normal	10:40 PM	
Punches: Tue Nov 25, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	4:57 PM	5:07
SB	03660	Normal	10:04 PM	0:11
EB	03660	Normal	10:15 PM	0:17
ES	03660	Normal	10:32 PM
Punches: Thu Nov 27, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	12:18 PM	4:33
SB	03660	Normal	4:51 PM	0:11
EB	03660	Normal	5:02 PM	0:29
ES	03660	Normal	5:31 PM	
Punches: Fri Nov 28, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:30 PM	4:35
SB	03660	Normal	10:05 PM	0:18
EB	03660	Normal	10:23 PM	0:29
ES	03660	Normal	10:52 PM	
Punches: Sat Nov 29, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:19 PM	4:44
SB	03660	Normal	10:03 PM	0:11
EB	03660	Normal	10:14 PM	0:22
ES	03660	Normal	10:36 PM	
Punches: Sun Nov 30, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:13 PM	4:56
SB	03660	Normal	10:09 PM	0:15
EB	03660	Normal	10:24 PM	0:10
ES	03660	Normal	10:34 PM	
Punches: Mon Dec 1, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:34 PM	3:48
SB	03660	Normal	9:22 PM	0:13
EB	03660	Normal	9:35 PM	0:48
ES	03660	Normal	10:23 PM	
Punches: Tue Dec 2, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:30 PM	4:30
SB	03660	Normal	10:00 PM	0:13
EB	03660	Normal	10:13 PM	0:20
ES	03660	Normal	10:33 PM	
Punches: Fri Dec 5, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:30 PM	4:36
SB	03660	Normal	10:06 PM	0:18
EB	03660	Normal	10:24 PM	0:27
ES	03660	Normal	10:51 PM	
Punches: Sat Dec 6, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:30 PM	4:31
SB	03660	Normal	10:01 PM	0:11
EB	03660	Normal	10:12 PM	0:23
ES	03660	Normal	10:35 PM	
Punches: Sun Dec 7, 2025
Type	Store	Status	Time	Hrs
SS	03660	Normal	3:52 PM	6:03
SB	03660	Normal	9:55 PM	0:12
EB	03660	Normal	10:07 PM	0:24
ES	03660	Normal	10:31 PM	





Punches: Thu Feb 5, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:15 PM	4:38
SB	03660	Normal	9:53 PM	0:12
EB	03660	Normal	10:05 PM	0:20
ES	03660	Normal	10:25 PM
Punches: Fri Feb 6, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:29 PM	4:33
SB	03660	Normal	10:02 PM	0:12
EB	03660	Normal	10:14 PM	0:35
ES	03660	Normal	10:49 PM	
Punches: Sat Feb 7, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:32 PM	4:34
SB	03660	Normal	10:06 PM	0:11
EB	03660	Normal	10:17 PM	0:26
ES	03660	Normal	10:43 PM	

Punches: Sun Feb 8, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:28 PM	4:16
SB	03660	Normal	9:44 PM	0:13
EB	03660	Normal	9:57 PM	0:34
ES	03660	Normal	10:31 PM	
Punches: Mon Feb 9, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:30 PM	4:25
SB	03660	Normal	9:55 PM	0:13
EB	03660	Normal	10:08 PM	0:39
ES	03660	Normal	10:47 PM	
Punches: Wed Feb 11, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:36 PM	4:07
SB	03660	Normal	9:43 PM	0:12
EB	03660	Normal	9:55 PM	0:51
ES	03660	Normal	10:46 PM	
Punches: Fri Feb 13, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:30 PM	4:15
SB	03660	Normal	9:45 PM	0:16
EB	03660	Normal	10:01 PM	2:21
Punches: Sat Feb 14, 2026
Type	Store	Status	Time	Hrs
ES	03660	Normal	12:22 AM	
SS	03660	Normal	5:05 PM	4:49
SB	03660	Normal	9:54 PM	0:11
EB	03660	Normal	10:05 PM	0:59
ES	03660	Normal	11:04 PM	
Punches: Sun Feb 15, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:25 PM	4:20
SB	03660	Normal	9:45 PM	0:10
EB	03660	Normal	9:55 PM	0:34
ES	03660	Normal	10:29 PM	
Punches: Mon Feb 16, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:23 PM	4:40
SB	03660	Normal	10:03 PM	0:10
EB	03660	Normal	10:13 PM	0:39
ES	03660	Normal	10:52 PM	
Punches: Wed Feb 18, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:20 PM	4:26
SB	03660	Normal	9:46 PM	0:13
EB	03660	Normal	9:59 PM	0:32
ES	03660	Normal	10:31 PM	
Punches: Fri Feb 20, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:29 PM	4:29
SB	03660	Added	9:58 PM	0:10
EB	03660	Normal	10:08 PM	0:24
ES	03660	Normal	10:32 PM	
Punches: Wed Feb 25, 2026
Type	Store	Status	Time	Hrs
SS	03660	Added	5:30 PM	4:43
SB	03660	Added	10:13 PM	0:10
EB	03660	Normal	10:23 PM	0:23
ES	03660	Added	10:46 PM	
Punches: Thu Feb 26, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:25 PM	4:12
SB	03660	Normal	9:37 PM	0:10
EB	03660	Added	9:47 PM	0:47
ES	03660	Normal	10:34 PM	
Punches: Fri Feb 27, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:33 PM	4:19
SB	03660	Normal	9:52 PM	0:13
EB	03660	Normal	10:05 PM	0:37
ES	03660	Normal	10:42 PM	
Punches: Sat Feb 28, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:29 PM	4:09
SB	03660	Normal	9:38 PM	0:11
EB	03660	Normal	9:49 PM	1:08
ES	03660	Normal	10:57 PM	
Punches: Sun Mar 1, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:33 PM	4:20
SB	03660	Normal	9:53 PM	0:10
EB	03660	Normal	10:03 PM	1:26
ES	03660	Normal	11:29 PM	
Punches: Mon Mar 2, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:37 PM	3:39
SB	03660	Normal	9:16 PM	0:13
EB	03660	Normal	9:29 PM	1:20
ES	03660	Normal	10:49 PM	
Punches: Wed Mar 4, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:28 PM	4:51
SB	03660	Normal	10:19 PM	0:11
EB	03660	Normal	10:30 PM	0:05
ES	03660	Normal	10:35 PM	
Punches: Thu Mar 5, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:26 PM	4:25
SB	03660	Normal	9:51 PM	0:11
EB	03660	Normal	10:02 PM	0:45
ES	03660	Added	10:47 PM	
Punches: Fri Mar 6, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:33 PM	4:32
SB	03660	Normal	10:05 PM	0:15
EB	03660	Normal	10:20 PM	0:17
ES	03660	Normal	10:37 PM	
Punches: Sat Mar 7, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:34 PM	4:30
SB	03660	Normal	10:04 PM	0:13
EB	03660	Normal	10:17 PM	0:36
ES	03660	Normal	10:53 PM	
Punches: Sun Mar 8, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:00 PM	4:33
SB	03660	Normal	9:33 PM	0:14
EB	03660	Normal	9:47 PM	0:56
ES	03660	Normal	10:43 PM	
Punches: Mon Mar 9, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:30 PM	4:23
SB	03660	Normal	9:53 PM	0:12
EB	03660	Normal	10:05 PM	1:03
ES	03660	Normal	11:08 PM	
Punches: Wed Mar 11, 2026
Type	Store	Status	Time	Hrs
SS	03660	Normal	5:25 PM	4:19
SB	03660	Normal	9:44 PM	0:14
EB	03660	Normal	9:58 PM	1:02
ES	03660	Normal	11:00 PM	



stdout
From "https://c...content-available-to-author-only...e.com/pwm/action/mobileGetTimesheetPunches"
Sun 11/2, scheduledTime, 4:37, 9:22, 9:34, 10:17, no bank run; 
Mon 11/3, scheduledTime, 5:39, 9:24, 9:34, 10:29, no bank run; 
Tue 11/4, scheduledTime, 4:50, 9:25, 9:36, 10:28, no bank run; 
Fri 11/7, scheduledTime, 5:38, 10:03, 10:14, 10:37, no bank run; 
Sat 11/8, scheduledTime, 5:32, 10:03, 10:14, 10:27, no bank run; 
Sun 11/9, scheduledTime, 4:36, 9:33, 9:45, 10:14, no bank run; 
Mon 11/10, scheduledTime, 5:27, 9:34, 9:44, 10:27, no bank run; 
Tue 11/11, scheduledTime, 5:18, 9:18, 9:35, 10:27, no bank run; 
Fri 11/14, scheduledTime, 5:31, 9:55, 10:09, 10:36, no bank run; 
Sat 11/15, scheduledTime, 5:26, 10:02, 10:20, 10:39, no bank run; 
Sun 11/16, scheduledTime, 4:44, 9:51, 10:01, 10:15, no bank run; 
Mon 11/17, scheduledTime, 5:41, 9:22, 9:32, 10:26, no bank run; 
Tue 11/18, scheduledTime, 5:17, 9:47, 10:01, 10:32, no bank run; 
Fri 11/21, scheduledTime, 5:32, 10:08, 10:18, 11:17, no bank run; 
Sat 11/22, scheduledTime, 5:26, 10:05, 10:17, 10:47, no bank run; 
Sun 11/23, scheduledTime, 3:57, 10:02, 10:13, 10:26, no bank run; 
Mon 11/24, scheduledTime, 5:36, 10:00, 10:12, 10:40, no bank run; 
Tue 11/25, scheduledTime, 4:57, 10:04, 10:15, 10:32, no bank run; 
Thu 11/27, scheduledTime, 12:18, 4:51, 5:02, 5:31, no bank run; 
Fri 11/28, scheduledTime, 5:30, 10:05, 10:23, 10:52, no bank run; 
Sat 11/29, scheduledTime, 5:19, 10:03, 10:14, 10:36, no bank run; 
Sun 11/30, scheduledTime, 5:13, 10:09, 10:24, 10:34, no bank run; 
Mon 12/1, scheduledTime, 5:34, 9:22, 9:35, 10:23, no bank run; 
Tue 12/2, scheduledTime, 5:30, 10:00, 10:13, 10:33, no bank run; 
Fri 12/5, scheduledTime, 5:30, 10:06, 10:24, 10:51, no bank run; 
Sat 12/6, scheduledTime, 5:30, 10:01, 10:12, 10:35, no bank run; 
Sun 12/7, scheduledTime, 3:52, 9:55, 10:07, 10:31, no bank run; 
Thu 02/5, scheduledTime, 5:15, 9:53, 10:05, 10:25, no bank run; 
Fri 02/6, scheduledTime, 5:29, 10:02, 10:14, 10:49, no bank run; 
Sat 02/7, scheduledTime, 5:32, 10:06, 10:17, 10:43, no bank run; 
Sun 02/8, scheduledTime, 5:28, 9:44, 9:57, 10:31, no bank run; 
Mon 02/9, scheduledTime, 5:30, 9:55, 10:08, 10:47, no bank run; 
Wed 02/11, scheduledTime, 5:36, 9:43, 9:55, 10:46, no bank run; 
Fri 02/13, scheduledTime, 5:30, 9:45, 10:01Sat 02/14, scheduledTime, 12:22, no bank run; 
, 5:05, 9:54, 10:05, 11:04, no bank run; 
Sun 02/15, scheduledTime, 5:25, 9:45, 9:55, 10:29, no bank run; 
Mon 02/16, scheduledTime, 5:23, 10:03, 10:13, 10:52, no bank run; 
Wed 02/18, scheduledTime, 5:20, 9:46, 9:59, 10:31, no bank run; 
Fri 02/20, scheduledTime, 5:29, 9:58, 10:08, 10:32, no bank run; 
Wed 02/25, scheduledTime, 5:30, 10:13, 10:23, 10:46, no bank run; 
Thu 02/26, scheduledTime, 5:25, 9:37, 9:47, 10:34, no bank run; 
Fri 02/27, scheduledTime, 5:33, 9:52, 10:05, 10:42, no bank run; 
Sat 02/28, scheduledTime, 5:29, 9:38, 9:49, 10:57, no bank run; 
Sun 03/1, scheduledTime, 5:33, 9:53, 10:03, 11:29, no bank run; 
Mon 03/2, scheduledTime, 5:37, 9:16, 9:29, 10:49, no bank run; 
Wed 03/4, scheduledTime, 5:28, 10:19, 10:30, 10:35, no bank run; 
Thu 03/5, scheduledTime, 5:26, 9:51, 10:02, 10:47, no bank run; 
Fri 03/6, scheduledTime, 5:33, 10:05, 10:20, 10:37, no bank run; 
Sat 03/7, scheduledTime, 5:34, 10:04, 10:17, 10:53, no bank run; 
Sun 03/8, scheduledTime, 5:00, 9:33, 9:47, 10:43, no bank run; 
Mon 03/9, scheduledTime, 5:30, 9:53, 10:05, 11:08, no bank run; 
Wed 03/11, scheduledTime, 5:25, 9:44, 9:58, 11:00, no bank run;