Skip to content

Commit

Permalink
Update variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyi105 committed Nov 13, 2023
1 parent b721daa commit ce52191
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/seedu/cafectrl/data/CurrentDate.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ public class CurrentDate {
private int currentDay;

public CurrentDate() {
currentDay = ZERO;
currentDay = DAY_BASE_NUMBER;
}
public CurrentDate(int day) {
currentDay = day - ONE;
currentDay = day - DAY_OFFSET;
}
public CurrentDate(Sales sales) {
setDate(sales);
}

public void nextDay() {
currentDay += ONE;
currentDay += DAY_OFFSET;
}

public void previousDay() {
currentDay -= ONE;
currentDay -= DAY_OFFSET;
}

public int getCurrentDay() {
Expand All @@ -40,10 +40,10 @@ public void setDate(Sales sales) {
ArrayList<OrderList> orderLists = sales.getOrderLists();
int orderListsSize = orderLists.size();

if (orderListsSize > ZERO) {
currentDay = orderListsSize - ONE;
if (orderListsSize > MIN_ORDER_LIST_SIZE) {
currentDay = orderListsSize - ORDER_LIST_SIZE_OFFSET;
} else {
currentDay = ZERO;
currentDay = DAY_BASE_NUMBER;
}
}
}

0 comments on commit ce52191

Please sign in to comment.