org.silverpeas.calendar
Class CalendarDay

java.lang.Object
  extended by org.silverpeas.calendar.CalendarDay
Direct Known Subclasses:
CalendarDateTime

public class CalendarDay
extends Object

An almanach day is a day within a calendar.


Constructor Summary
protected CalendarDay(Date date, String locale)
          Constructs a new CalendarDay instance from the specified date.
 
Method Summary
 Date getDate()
          Gets this day as a Date instance.
 int getDayOfMonth()
          Gets the day of the month (from 1 to 31).
 int getMonth()
          Gets the month.
 int getWeekOfYear()
          Gets the week number (from 1 to 53).
 int getYear()
          Gets the year.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalendarDay

protected CalendarDay(Date date,
                      String locale)
Constructs a new CalendarDay instance from the specified date.

Parameters:
date - the date of the day.
locale - the locale.
Method Detail

getDayOfMonth

public int getDayOfMonth()
Gets the day of the month (from 1 to 31).

Returns:
the number of the day in the month.

getMonth

public int getMonth()
Gets the month.

Returns:
the month: 1 for january, 2 for february, and so one.

getYear

public int getYear()
Gets the year.

Returns:
the year in 4 digits.

getWeekOfYear

public int getWeekOfYear()
Gets the week number (from 1 to 53).

Returns:
the week number

getDate

public Date getDate()
Gets this day as a Date instance.

Returns:
the Date representation of this day.


Copyright © 2016 Silverpeas. All Rights Reserved.