ch.sahits.game.openpatrician.model.time
Class DateObject
java.lang.Object
ch.sahits.game.openpatrician.model.time.DateObject
public final class DateObject
- extends Object
This simple date object holds a date with year, month, day of month, day in week (starting with monday),
hour and minute.
- Author:
- Andi Hotz, (c) Sahits GmbH, 2012
Created on Jul 22, 2012
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
year
private final int year
month
private final int month
dayInMonth
private final int dayInMonth
dayInWeek
private final int dayInWeek
hour
private final int hour
minute
private final int minute
DateObject
public DateObject(Calendar cal)
getYear
public int getYear()
getMonth
public int getMonth()
getDayInMonth
public int getDayInMonth()
getDayInWeek
public int getDayInWeek()
- Retrieve the day in the week starting with Monday at index 0
- Returns:
getHour
public int getHour()
getMinute
public int getMinute()
toDisplayString
public String toDisplayString()
- Representation that can be displayed
- Returns:
isSameDate
public boolean isSameDate(DateObject date)
Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.