Class RsMonth

All Implemented Interfaces:
Serializable, Cloneable, Comparable<Calendar>

@Deprecated public class RsMonth extends RsDate
Deprecated.
- Use JavaTime interfaces instead
A month.
Author:
Ralph
See Also:
  • Constructor Details

    • RsMonth

      public RsMonth()
      Deprecated.
      Constructor.
    • RsMonth

      public RsMonth(TimeZone timezone)
      Deprecated.
      Constructor.
      Parameters:
      timezone - - init with this timezone
      Since:
      1.2.8
    • RsMonth

      public RsMonth(Date date)
      Deprecated.
      Constructor.
      Parameters:
      date - - init with date
    • RsMonth

      public RsMonth(TimeZone timezone, Date date)
      Deprecated.
      Constructor.
      Parameters:
      timezone - - init with this timezone
      date - - init with date
    • RsMonth

      public RsMonth(long timeInMillis)
      Deprecated.
      Constructor.
      Parameters:
      timeInMillis - - init with timestamp
    • RsMonth

      public RsMonth(TimeZone timezone, long timeInMillis)
      Deprecated.
      Constructor.
      Parameters:
      timezone - - init with this timezone
      timeInMillis - - init with timestamp
    • RsMonth

      public RsMonth(Calendar calendar)
      Deprecated.
      Constructor.
      Parameters:
      calendar - - init with calendar value
    • RsMonth

      public RsMonth(int month, int year)
      Deprecated.
      Constructor.
      Parameters:
      month - month value (0-11)
      year - year value
    • RsMonth

      public RsMonth(TimeZone timezone, int month, int year)
      Deprecated.
      Constructor.
      Parameters:
      timezone - - init with this timezone
      month - month value (0-11)
      year - year value
      Since:
      1.2.8
    • RsMonth

      public RsMonth(ZonedDateTime timestamp)
      Deprecated.
      Constructor.
      Parameters:
      timestamp - the zoned date time object from JavaTime API
      Since:
      3.0.0
  • Method Details

    • ensureBegin

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

      public String getKey()
      Deprecated.
      Returns the key of this month.
      Returns:
      the key of this month
    • getBegin

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

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

      public RsMonth getNext()
      Deprecated.
      Returns the next month.
      Returns:
      next month
    • getNext

      public RsMonth getNext(int n)
      Deprecated.
      Returns the n-th next month.
      Parameters:
      n - the number of months to roll
      Returns:
      n-th next month
      Since:
      3.0.0
    • getPrevious

      public RsMonth getPrevious()
      Deprecated.
      Returns the previous month.
      Returns:
      previous month
    • getPrevious

      public RsMonth getPrevious(int n)
      Deprecated.
      Returns the n-th previous month.
      Parameters:
      n - the number of months to roll
      Returns:
      n-th previous month
      Since:
      3.0.0
    • roll

      public RsMonth roll(int months)
      Deprecated.
      Returns a month by rolling back or forth this month
      Parameters:
      months - months to roll (can be negative)
      Returns:
      the n-th month before or after this month
      Since:
      3.0.0
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class GregorianCalendar
    • hashCode

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

      public String toString()
      Deprecated.
      Overrides:
      toString in class RsDate
    • getMonth

      public static RsMonth getMonth(String key)
      Deprecated.
      Returns a month object for the given key.
      Parameters:
      key - key of month
      Returns:
      month object
    • from

      public static RsMonth from(ZonedDateTime timestamp)
      Deprecated.
      Returns a month object for the given timestamp.
      Parameters:
      timestamp - any timestamp of JavaTime API
      Returns:
      month object
      Since:
      3.0.0