Class RsDay

java.lang.Object
java.util.Calendar
java.util.GregorianCalendar
rs.baselib.util.RsDate
rs.baselib.util.RsDay
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Calendar>

public class RsDay
extends RsDate
A day.
Author:
Ralph
See Also:
Serialized Form
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.util.Calendar

    java.util.Calendar.Builder
  • Field Summary

    Fields inherited from class java.util.GregorianCalendar

    AD, BC

    Fields inherited from class java.util.Calendar

    ALL_STYLES, AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, LONG, LONG_FORMAT, LONG_STANDALONE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NARROW_FORMAT, NARROW_STANDALONE, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SHORT_FORMAT, SHORT_STANDALONE, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
  • Constructor Summary

    Constructors 
    Constructor Description
    RsDay()
    Constructor.
    RsDay​(int day, int month, int year)
    Constructor.
    RsDay​(long timeInMillis)
    Constructor.
    RsDay​(java.util.Calendar calendar)
    Constructor.
    RsDay​(java.util.Date date)
    Constructor.
    RsDay​(java.util.TimeZone timezone)
    Constructor.
    RsDay​(java.util.TimeZone timezone, int day, int month, int year)
    Constructor.
    RsDay​(java.util.TimeZone timezone, long timeInMillis)
    Constructor.
    RsDay​(java.util.TimeZone timezone, java.util.Date date)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    protected void ensureBegin()
    Adjusts the time stamp to the start of the day.
    boolean equals​(java.lang.Object o)
    RsDate getBegin()
    Returns the begin of this month.
    static RsDay getDay​(java.lang.String key)
    Returns a day object for the given key.
    RsDate getEnd()
    Returns the end of this month.
    java.lang.String getKey()
    Returns the key of this month.
    RsDay getNext()
    Returns the next month.
    RsDay getPrevious()
    Returns the previous month.
    int hashCode()
    java.lang.String toString()

    Methods inherited from class rs.baselib.util.RsDate

    get, get, get, getDay, getMonth, getYear

    Methods inherited from class java.util.GregorianCalendar

    add, clone, computeFields, computeTime, from, getActualMaximum, getActualMinimum, getCalendarType, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, getWeeksInWeekYear, getWeekYear, isLeapYear, isWeekDateSupported, roll, roll, setGregorianChange, setTimeZone, setWeekDate, toZonedDateTime

    Methods inherited from class java.util.Calendar

    after, before, clear, clear, compareTo, complete, get, getAvailableCalendarTypes, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, toInstant

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RsDay

      public RsDay()
      Constructor.
    • RsDay

      public RsDay​(java.util.TimeZone timezone)
      Constructor.
      Parameters:
      timezone - - init with this timezone
      Since:
      1.2.8
    • RsDay

      public RsDay​(java.util.Date date)
      Constructor.
      Parameters:
      date - - init with this date
    • RsDay

      public RsDay​(java.util.TimeZone timezone, java.util.Date date)
      Constructor.
      Parameters:
      timezone - - init with this timezone
      date - - init with this date
    • RsDay

      public RsDay​(long timeInMillis)
      Constructor.
      Parameters:
      timeInMillis - - init with this timestamp
    • RsDay

      public RsDay​(java.util.TimeZone timezone, long timeInMillis)
      Constructor.
      Parameters:
      timezone - - init with this timezone
      timeInMillis - - init with this timestamp
    • RsDay

      public RsDay​(java.util.Calendar calendar)
      Constructor.
      Parameters:
      calendar - calendar to be based on
    • RsDay

      public RsDay​(int day, int month, int year)
      Constructor.
      Parameters:
      day - day of month value (1-31)
      month - month value (0-11)
      year - year value
      Since:
      1.2.7
    • RsDay

      public RsDay​(java.util.TimeZone timezone, int day, int month, int year)
      Constructor.
      Parameters:
      timezone - - init with this timezone
      day - day of month value (1-31)
      month - month value (0-11)
      year - year value
      Since:
      1.2.8
  • Method Details

    • ensureBegin

      protected void ensureBegin()
      Adjusts the time stamp to the start of the day.
    • getKey

      public java.lang.String getKey()
      Returns the key of this month.
      Returns:
      the key of this day.
    • getBegin

      public RsDate getBegin()
      Returns the begin of this month.
      Returns:
      begin of month
    • getEnd

      public RsDate getEnd()
      Returns the end of this month.
      Returns:
      begin of month
    • getNext

      public RsDay getNext()
      Returns the next month.
      Returns:
      next month
    • getPrevious

      public RsDay getPrevious()
      Returns the previous month.
      Returns:
      previous month
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.util.GregorianCalendar
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.util.GregorianCalendar
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class RsDate
    • getDay

      public static RsDay getDay​(java.lang.String key)
      Returns a day object for the given key.
      Parameters:
      key - key of day
      Returns:
      day object