Package rs.baselib.util
Class RsMonth
java.lang.Object
java.util.Calendar
java.util.GregorianCalendar
rs.baselib.util.RsDate
rs.baselib.util.RsMonth
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Calendar>
Deprecated.
- Use JavaTime interfaces instead
A month.
- Author:
- Ralph
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.Calendar
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
ConstructorDescriptionRsMonth()
Deprecated.Constructor.RsMonth
(int month, int year) Deprecated.Constructor.RsMonth
(long timeInMillis) Deprecated.Constructor.RsMonth
(ZonedDateTime timestamp) Deprecated.Constructor.Deprecated.Constructor.Deprecated.Constructor.Deprecated.Constructor.Deprecated.Constructor.Deprecated.Constructor.Deprecated.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Deprecated.Adjusts the time stamp to the start of the month.boolean
Deprecated.static RsMonth
from
(ZonedDateTime timestamp) Deprecated.Returns a month object for the given timestamp.getBegin()
Deprecated.Returns the begin of this month.getEnd()
Deprecated.Returns the end of this month.getKey()
Deprecated.Returns the key of this month.static RsMonth
Deprecated.Returns a month object for the given key.getNext()
Deprecated.Returns the next month.getNext
(int n) Deprecated.Returns the n-th next month.Deprecated.Returns the previous month.getPrevious
(int n) Deprecated.Returns the n-th previous month.int
hashCode()
Deprecated.roll
(int months) Deprecated.Returns a month by rolling back or forth this monthtoString()
Deprecated.Methods inherited from class java.util.GregorianCalendar
add, clone, computeFields, computeTime, 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
-
Constructor Details
-
RsMonth
public RsMonth()Deprecated.Constructor. -
RsMonth
Deprecated.Constructor.- Parameters:
timezone
- - init with this timezone- Since:
- 1.2.8
-
RsMonth
Deprecated.Constructor.- Parameters:
date
- - init with date
-
RsMonth
Deprecated.Constructor.- Parameters:
timezone
- - init with this timezonedate
- - init with date
-
RsMonth
public RsMonth(long timeInMillis) Deprecated.Constructor.- Parameters:
timeInMillis
- - init with timestamp
-
RsMonth
Deprecated.Constructor.- Parameters:
timezone
- - init with this timezonetimeInMillis
- - init with timestamp
-
RsMonth
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
Deprecated.Constructor.- Parameters:
timezone
- - init with this timezonemonth
- month value (0-11)year
- year value- Since:
- 1.2.8
-
RsMonth
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
Deprecated.Returns the key of this month.- Returns:
- the key of this month
-
getBegin
Deprecated.Returns the begin of this month.- Returns:
- begin of month
-
getEnd
Deprecated.Returns the end of this month.- Returns:
- begin of month
-
getNext
Deprecated.Returns the next month.- Returns:
- next month
-
getNext
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
Deprecated.Returns the previous month.- Returns:
- previous month
-
getPrevious
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
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
Deprecated.- Overrides:
equals
in classGregorianCalendar
-
hashCode
public int hashCode()Deprecated.- Overrides:
hashCode
in classGregorianCalendar
-
toString
Deprecated. -
getMonth
Deprecated.Returns a month object for the given key.- Parameters:
key
- key of month- Returns:
- month object
-
from
Deprecated.Returns a month object for the given timestamp.- Parameters:
timestamp
- any timestamp of JavaTime API- Returns:
- month object
- Since:
- 3.0.0
-