Skip to content

Commit

Permalink
Remove unneeded parameter from Calendar.PrintYear
Browse files Browse the repository at this point in the history
  • Loading branch information
frossm committed Oct 2, 2023
1 parent b8511ea commit 2325834
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.fross</groupId>
<artifactId>cal</artifactId>
<version>2.4.4</version>
<version>2.4.5</version>
<packaging>jar</packaging>

<name>cal</name>
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: fcal
version: '2.4.4'
version: '2.4.5'
summary: Command line calendar display
description: |
fCal is a command line calendar utility. It will display a
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/fross/cal/Calendar.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public class Calendar {
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 protected final String[] MONTHLIST = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October",
"November", "December" };
static protected final Color TODAYHIGHLIGHT_FG = Ansi.Color.WHITE;
static protected final Color TODAYHIGHLIGHT_BG = Ansi.Color.BLUE;

Expand Down Expand Up @@ -126,10 +126,9 @@ public static void printMonth(int month, int year) {
/**
* printYear(): Print the entire year
*
* @param month
* @param year
*/
public static void printYear(int month, int year) {
public static void printYear(int year) {
String[] days = new String[6];
String[] dayrows = new String[6];
int i, j, k;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/fross/cal/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ 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());
Calendar.printYear(CommandLineArgs.queryYearToUse());
break;

// A month or year was given. Assume it's a month if it's 1-12
// 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());
Calendar.printYear(CommandLineArgs.queryYearToUse());
} else {
Calendar.printMonth(CommandLineArgs.queryMonthToUse(), CommandLineArgs.queryYearToUse());
}
Expand Down

0 comments on commit 2325834

Please sign in to comment.