public class PackedLocalDate
extends java.lang.Object
The bytes are packed into the int as: First two bytes: short (year) next byte (month of year) last byte (day of month)
Constructor and Description |
---|
PackedLocalDate() |
Modifier and Type | Method and Description |
---|---|
static java.time.LocalDate |
asLocalDate(int date) |
static byte |
getDayOfMonth(int date) |
static java.time.DayOfWeek |
getDayOfWeek(int packedDate) |
static int |
getDayOfYear(int packedDate) |
static java.time.Month |
getMonth(int packedDate) |
static byte |
getMonthValue(int date) |
static int |
getQuarter(int packedDate) |
static short |
getYear(int date) |
static boolean |
isAfter(int packedDate,
int value) |
static boolean |
isBefore(int packedDate,
int value) |
static boolean |
isFirstDayOfMonth(int packedDate) |
static boolean |
isFriday(int packedDate) |
static boolean |
isInApril(int packedDate) |
static boolean |
isInAugust(int packedDate) |
static boolean |
isInDecember(int packedDate) |
static boolean |
isInFebruary(int packedDate) |
static boolean |
isInJanuary(int packedDate) |
static boolean |
isInJuly(int packedDate) |
static boolean |
isInJune(int packedDate) |
static boolean |
isInMarch(int packedDate) |
static boolean |
isInMay(int packedDate) |
static boolean |
isInNovember(int packedDate) |
static boolean |
isInOctober(int packedDate) |
static boolean |
isInQ1(int packedDate) |
static boolean |
isInQ2(int packedDate) |
static boolean |
isInQ3(int packedDate) |
static boolean |
isInQ4(int packedDate) |
static boolean |
isInSeptember(int packedDate) |
static boolean |
isInYear(int next,
int year) |
static boolean |
isLastDayOfMonth(int packedDate) |
static boolean |
isLeapYear(int packedDate) |
static boolean |
isMonday(int packedDate) |
static boolean |
isOnOrAfter(int packedDate,
int value) |
static boolean |
isOnOrBefore(int packedDate,
int value) |
static boolean |
isSaturday(int packedDate) |
static boolean |
isSunday(int packedDate) |
static boolean |
isThursday(int packedDate) |
static boolean |
isTuesday(int packedDate) |
static boolean |
isWednesday(int packedDate) |
static int |
lengthOfMonth(int packedDate) |
int |
lengthOfYear(int packedDate) |
static int |
pack(java.util.Date date) |
static int |
pack(java.time.LocalDate date) |
static int |
pack(short yr,
byte m,
byte d) |
static java.lang.String |
toDateString(int date) |
static long |
toEpochDay(int packedDate)
Returns the epoch day in a form consistent with the java standard
|
public static byte getDayOfMonth(int date)
public static short getYear(int date)
public static java.time.LocalDate asLocalDate(int date)
public static byte getMonthValue(int date)
public static int pack(java.time.LocalDate date)
public static int pack(java.util.Date date)
public static int pack(short yr, byte m, byte d)
public static java.lang.String toDateString(int date)
public static int getDayOfYear(int packedDate)
public static boolean isLeapYear(int packedDate)
public static java.time.Month getMonth(int packedDate)
public static int lengthOfMonth(int packedDate)
public int lengthOfYear(int packedDate)
public static long toEpochDay(int packedDate)
public static java.time.DayOfWeek getDayOfWeek(int packedDate)
public static int getQuarter(int packedDate)
public static boolean isInQ1(int packedDate)
public static boolean isInQ2(int packedDate)
public static boolean isInQ3(int packedDate)
public static boolean isInQ4(int packedDate)
public static boolean isAfter(int packedDate, int value)
public static boolean isBefore(int packedDate, int value)
public static boolean isOnOrBefore(int packedDate, int value)
public static boolean isOnOrAfter(int packedDate, int value)
public static boolean isSunday(int packedDate)
public static boolean isMonday(int packedDate)
public static boolean isTuesday(int packedDate)
public static boolean isWednesday(int packedDate)
public static boolean isThursday(int packedDate)
public static boolean isFriday(int packedDate)
public static boolean isSaturday(int packedDate)
public static boolean isFirstDayOfMonth(int packedDate)
public static boolean isInJanuary(int packedDate)
public static boolean isInFebruary(int packedDate)
public static boolean isInMarch(int packedDate)
public static boolean isInApril(int packedDate)
public static boolean isInMay(int packedDate)
public static boolean isInJune(int packedDate)
public static boolean isInJuly(int packedDate)
public static boolean isInAugust(int packedDate)
public static boolean isInSeptember(int packedDate)
public static boolean isInOctober(int packedDate)
public static boolean isInNovember(int packedDate)
public static boolean isInDecember(int packedDate)
public static boolean isLastDayOfMonth(int packedDate)
public static boolean isInYear(int next, int year)