public class CalendarUtils
extends java.lang.Object
| Constructor and Description |
|---|
CalendarUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
amod(int x,
int y) |
static long |
amod(long x,
long y) |
static int |
floorDivide(int n,
int d)
Divides two integers and returns the floor of the quotient.
|
static int |
floorDivide(int n,
int d,
int[] r)
Divides two integers and returns the floor of the quotient and
the modulus remainder.
|
static int |
floorDivide(long n,
int d,
int[] r)
Divides two integers and returns the floor of the quotient and
the modulus remainder.
|
static long |
floorDivide(long n,
long d)
Divides two integers and returns the floor of the quotient.
|
static boolean |
isGregorianLeapYear(int gregorianYear)
Returns whether the specified year is a leap year in the Gregorian
calendar system.
|
static boolean |
isJulianLeapYear(int normalizedJulianYear)
Returns whether the specified year is a leap year in the Julian
calendar system.
|
static int |
mod(int x,
int y) |
static long |
mod(long x,
long y) |
static java.lang.StringBuffer |
sprintf0d(java.lang.StringBuffer sb,
int value,
int width) |
static java.lang.StringBuilder |
sprintf0d(java.lang.StringBuilder sb,
int value,
int width)
Mimics sprintf(buf, "%0*d", decaimal, width).
|
public static final boolean isGregorianLeapYear(int gregorianYear)
gregorianYear - a Gregorian calendar yearCalendarDate.isLeapYear()public static final boolean isJulianLeapYear(int normalizedJulianYear)
normalizedJulianYear - a normalized Julian calendar yearCalendarDate.isLeapYear()public static final long floorDivide(long n,
long d)
floorDivide(-1, 4) returns -1 while
-1/4 is 0.n - the numeratord - a divisor that must be greater than 0public static final int floorDivide(int n,
int d)
floorDivide(-1, 4) returns -1 while
-1/4 is 0.n - the numeratord - a divisor that must be greater than 0public static final int floorDivide(int n,
int d,
int[] r)
floorDivide(-1,4) returns -1 with
3 as its remainder, while -1/4 is
0 and -1%4 is -1.n - the numeratord - a divisor which must be > 0r - an array of at least one element in which the value
mod(n, d) is returned.public static final int floorDivide(long n,
int d,
int[] r)
floorDivide(-1,4) returns -1 with
3 as its remainder, while -1/4 is
0 and -1%4 is -1.n - the numeratord - a divisor which must be > 0r - an array of at least one element in which the value
mod(n, d) is returned.public static final long mod(long x,
long y)
public static final int mod(int x,
int y)
public static final int amod(int x,
int y)
public static final long amod(long x,
long y)
public static final java.lang.StringBuilder sprintf0d(java.lang.StringBuilder sb,
int value,
int width)
public static final java.lang.StringBuffer sprintf0d(java.lang.StringBuffer sb,
int value,
int width)