ch.sahits.game.openpatrician.model.time
Class DateObject

java.lang.Object
  extended by 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

Field Summary
private  int dayInMonth
           
private  int dayInWeek
           
private  int hour
           
private  int minute
           
private  int month
           
private  int year
           
 
Constructor Summary
DateObject(Calendar cal)
           
 
Method Summary
 int getDayInMonth()
           
 int getDayInWeek()
          Retrieve the day in the week starting with Monday at index 0
 int getHour()
           
 int getMinute()
           
 int getMonth()
           
 int getYear()
           
 boolean isSameDate(DateObject date)
           
 String toDisplayString()
          Representation that can be displayed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

DateObject

public DateObject(Calendar cal)
Method Detail

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.