public interface PartitionSize
Modifier and Type | Field and Description |
---|---|
static long |
DAY_IN_MONTH
approximate days in one month, that is, 30 days
|
static long |
DAY_IN_WEEK
days in a 7 day week... what color was his white horse?
|
static long |
DAY_IN_YEAR
days in one year, assuming a non-leap year
|
static String |
DAY_NAME |
static long |
HOUR_IN_DAY
hours in a day: 24
|
static String |
HOUR_NAME |
static String |
MONTH_NAME |
static long |
MS_IN_DAY
milliseconds in 1 day (approximate: no leap second accounted for)
|
static long |
MS_IN_HOUR
milliseconds in 1 hour (approximate: no leap second accounted for)
|
static long |
MS_IN_MONTH
milliseconds in one month (approximate: no leap day/sec accounted for,
and assumes 30 days in a month)
|
static long |
MS_IN_SEC
number of milliseconds in a second..
|
static long |
MS_IN_TWO_MONTH
milliseconds in two months (approximate: no leap day/sec accounted for,
and assumes 30 day months)
|
static long |
MS_IN_TWO_YEAR
milliseconds in two years (approximate: no leap day/sec accounted for)
|
static long |
MS_IN_WEEK
milliseconds in 7 days (approximate: no leap second accounted for)
|
static long |
MS_IN_YEAR
milliseconds in one year (approximate: no leap day/sec accounted for)
|
static long |
SEC_IN_HOUR
seconds in a non-leap-second hour
|
static String |
TWO_MONTH_NAME |
static String |
TWO_YEAR_NAME |
static String |
WEEK_NAME |
static String |
YEAR_NAME |
Modifier and Type | Method and Description |
---|---|
void |
alignStart(Calendar in)
Align the calendar argument to the start of the interval covered by
this size.
|
Calendar |
increment(Calendar start,
int offset)
Create a new Calendar object, aligned relative to the Calendar argument,
either forward or backward some number of partitions.
|
long |
intervalMS() |
String |
name() |
static final long MS_IN_SEC
static final long SEC_IN_HOUR
static final long HOUR_IN_DAY
static final long DAY_IN_WEEK
static final long DAY_IN_MONTH
static final long DAY_IN_YEAR
static final long MS_IN_HOUR
static final long MS_IN_DAY
static final long MS_IN_WEEK
static final long MS_IN_MONTH
static final long MS_IN_TWO_MONTH
static final long MS_IN_YEAR
static final long MS_IN_TWO_YEAR
static final String HOUR_NAME
static final String DAY_NAME
static final String WEEK_NAME
static final String MONTH_NAME
static final String TWO_MONTH_NAME
static final String YEAR_NAME
static final String TWO_YEAR_NAME
void alignStart(Calendar in)
in
- Calendar object which has internal Date setCalendar increment(Calendar start, int offset)
start
- the returned Calendar will be aligned one day, week, month,
etc. ahead or behind of this Calendar argument.offset
- the relative distance to move the returned calendar
relative to the argument Calendar.long intervalMS()
String name()
Copyright © 2005–2015 IIPC. All rights reserved.