Use Calendar in BonusEntry

This commit is contained in:
Spencer 2018-01-04 22:15:02 -05:00 committed by Alexander Meech
parent db66e166fa
commit 8820e33d09

View File

@ -1,5 +1,6 @@
package mineplex.staffServer.repository; package mineplex.staffServer.repository;
import java.util.Calendar;
import java.util.Date; import java.util.Date;
public class BonusEntry public class BonusEntry
@ -7,14 +8,16 @@ public class BonusEntry
private int _accountId; private int _accountId;
private String _itemName; private String _itemName;
private int _itemCount; private int _itemCount;
private Date _time; private Calendar _calendar;
public BonusEntry(int accountId, String itemName, int itemCount, Date time) public BonusEntry(int accountId, String itemName, int itemCount, Date date)
{ {
_accountId = accountId; _accountId = accountId;
_itemName = itemName; _itemName = itemName;
_itemCount = itemCount; _itemCount = itemCount;
_time = time;
_calendar = Calendar.getInstance();
_calendar.setTimeInMillis(date.getTime());
} }
public int getAccountId() public int getAccountId()
@ -32,8 +35,8 @@ public class BonusEntry
return _itemCount; return _itemCount;
} }
public Date getTime() public Calendar getCalendar()
{ {
return _time; return _calendar;
} }
} }