Package com.jk.core.time
Class JKTimeObject
java.lang.Object
com.jk.core.time.JKTimeObject
This class is used for representing time and date information.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanafter(JKTimeObject thareTime) This method checks if this time is after anotherJKTimeObjectinstance.booleanbefore(JKTimeObject thareTime) This method checks if this time is before anotherJKTimeObjectinstance.intgetDay()This method gets the day component of the date.intgetHour()This method gets the hour component of the time.intgetMonth()This method gets the month component of the date.intThis method gets the minutes component of the time.intgetYear()This method gets the year component of the date.voidsetDay(int day) This method sets the day component of the date.voidsetHour(int hour) This method sets the hour component of the time.voidsetMonth(int month) This method sets the month component of the date.voidsetMunite(int munite) This method sets the minutes component of the time.voidsetYear(int year) This method sets the year component of the date.toTimeObject(Date date, Date time) This method creates a newJKTimeObjectinstance based on the provided date and time. 
- 
Constructor Details
- 
JKTimeObject
public JKTimeObject()This method constructs a newJKTimeObject. 
 - 
 - 
Method Details
- 
getHour
public int getHour()This method gets the hour component of the time.- Returns:
 - the hour component.
 
 - 
setHour
public void setHour(int hour) This method sets the hour component of the time.- Parameters:
 hour- Specifies the new hour component.
 - 
getMunite
public int getMunite()This method gets the minutes component of the time.- Returns:
 - the minute component.
 
 - 
setMunite
public void setMunite(int munite) This method sets the minutes component of the time.- Parameters:
 munite- Specifies the new minute component.
 - 
toTimeObject
This method creates a newJKTimeObjectinstance based on the provided date and time.- Parameters:
 date- Specifies the date of this object.time- Specifies the time of this object.- Returns:
 - a new 
JKTimeObjectinstance. 
 - 
after
This method checks if this time is after anotherJKTimeObjectinstance.- Parameters:
 thareTime- Specifies the otherJKTimeObjectto compare.- Returns:
 - true, if this time is after the other time, otherwise 
false. 
 - 
before
This method checks if this time is before anotherJKTimeObjectinstance.- Parameters:
 thareTime- Specifies the otherJKTimeObjectto compare.- Returns:
 - true, if this time is before the other time, otherwise 
false. 
 - 
getYear
public int getYear()This method gets the year component of the date.- Returns:
 - the year component.
 
 - 
setYear
public void setYear(int year) This method sets the year component of the date.- Parameters:
 year- Specifies the new year component.
 - 
getMonth
public int getMonth()This method gets the month component of the date.- Returns:
 - the month component.
 
 - 
setMonth
public void setMonth(int month) This method sets the month component of the date.- Parameters:
 month- Specifies the new month component.
 - 
getDay
public int getDay()This method gets the day component of the date.- Returns:
 - the day component.
 
 - 
setDay
public void setDay(int day) This method sets the day component of the date.- Parameters:
 day- Specifies the new day component.
 
 -