diff --git a/graphics/SnapShot.jpg b/graphics/SnapShot.jpg index 51036cf..ef93a31 100644 Binary files a/graphics/SnapShot.jpg and b/graphics/SnapShot.jpg differ diff --git a/pom.xml b/pom.xml index 3bd888a..ec2c642 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.fross cal - 2.4.1 + 2.4.2 jar cal @@ -197,14 +197,14 @@ org.junit.jupiter junit-jupiter - 5.9.0 + 5.9.1 test org.fross library - 2022.07.28 + 2022.09.07 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a67f7b1..314c86d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: fcal -version: '2.4.1' +version: '2.4.2' summary: Command line calendar display description: | fCal is a command line calendar utility. It will display a @@ -24,7 +24,7 @@ parts: plugin: maven source: https://github.com/frossm/library.git source-type: git - source-tag: 'v2022.07.28' + source-tag: 'v2022.09.07' maven-options: [install] cal: diff --git a/src/main/java/org/fross/cal/Calendar.java b/src/main/java/org/fross/cal/Calendar.java index 3e0db24..c4ce5e9 100644 --- a/src/main/java/org/fross/cal/Calendar.java +++ b/src/main/java/org/fross/cal/Calendar.java @@ -36,13 +36,13 @@ public class Calendar { // Class Constants - static final int DEFAULT_CALS_PER_ROW = 3; - static final int CALENDARWIDTH = 20; - static final int SPACESBETWEENCALS = 2; - static final String[] MONTHLIST = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", + static protected final int DEFAULT_CALS_PER_ROW = 3; + static protected final int CALENDARWIDTH = 20; + static protected final int SPACESBETWEENCALS = 2; + static protected final String[] MONTHLIST = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; - static final Color TODAYHIGHLIGHT_FG = Ansi.Color.WHITE; - static final Color TODAYHIGHLIGHT_BG = Ansi.Color.BLUE; + static protected final Color TODAYHIGHLIGHT_FG = Ansi.Color.WHITE; + static protected final Color TODAYHIGHLIGHT_BG = Ansi.Color.BLUE; // Class Variables static int calsPerRow = DEFAULT_CALS_PER_ROW; diff --git a/src/main/java/org/fross/cal/CommandLineArgs.java b/src/main/java/org/fross/cal/CommandLineArgs.java index d9e6698..4593c01 100644 --- a/src/main/java/org/fross/cal/CommandLineArgs.java +++ b/src/main/java/org/fross/cal/CommandLineArgs.java @@ -83,8 +83,9 @@ public static void ProcessCommandLine(String[] argv) { // Process the parsed command line options // --------------------------------------------------------------------------------------------- // Debug Switch - if (cli.clDebug == true) + if (cli.clDebug == true) { Debug.enable(); + } // Set the stack name and restore stack from Preferences if (cli.clNum != Calendar.DEFAULT_CALS_PER_ROW) { diff --git a/src/main/java/org/fross/cal/Main.java b/src/main/java/org/fross/cal/Main.java index 5ef1f25..8892d0a 100644 --- a/src/main/java/org/fross/cal/Main.java +++ b/src/main/java/org/fross/cal/Main.java @@ -97,10 +97,13 @@ public static void main(String[] args) { // Display the calendars Output.println(""); switch (CommandLineArgs.cli.clMonthAndOrYear.size()) { + + // No month or year provided case 0: Calendar.printYear(CommandLineArgs.queryMonthToUse(), CommandLineArgs.queryYearToUse()); break; + // A month or year was given. Assume it's a month if it's 1-12 case 1: if (Integer.parseInt(CommandLineArgs.cli.clMonthAndOrYear.get(0)) > 12) { Calendar.printYear(CommandLineArgs.queryMonthToUse(), CommandLineArgs.queryYearToUse()); @@ -109,6 +112,7 @@ public static void main(String[] args) { } break; + // A month and a year was provided case 2: Calendar.printMonth(CommandLineArgs.queryMonthToUse(), CommandLineArgs.queryYearToUse()); break;