|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<DateRangeOption>
com.moneydance.apps.md.model.time.DateRangeOption
public enum DateRangeOption
Defines the various date ranges that can be selected in reports, budgets, etc. The ordinal
values are fixed to the original integers (indices) mapped to a date range, as previously defined
in DateRangeChooser
:
DR_YEAR_TO_DATE = 0 DR_QUARTER_TO_DATE = 1 DR_MONTH_TO_DATE = 2 DR_THIS_YEAR = 3 DR_THIS_QUARTER = 4 DR_THIS_MONTH = 5 DR_LAST_YEAR = 6 DR_LAST_QUARTER = 7 DR_LAST_MONTH = 8 DR_LAST_12_MONTHS = 9 DR_ALL_DATES = 10 DR_CUSTOM_DATE = 11New, additional date ranges were requested for the budget system, so these are tacked on to the end of the list. Because they are out-of-order for logical display purposes in a list, a sorting index is assigned so that the list of date ranges may be more logically presented to the user.
DR_LAST_30_DAYS = 12 DR_LAST_365_DAYS = 13 DR_THIS_WEEK = 14 DR_LAST_WEEK = 15 An additional request was for investment performance reports for the last day (seeing how market changes in one day affected results) DR_LAST_DAY = 16
Enum Constant Summary | |
---|---|
DR_ALL_DATES
All dates to today's date. |
|
DR_CUSTOM_DATE
User-defined date range. |
|
DR_LAST_1_DAY
Previous day to today. |
|
DR_LAST_12_MONTHS
Last 12 months from today's date, starting at 12 months prior to today until today's date. |
|
DR_LAST_30_DAYS
Last 30 days from today's date. |
|
DR_LAST_365_DAYS
Last 365 days from today's date. |
|
DR_LAST_MONTH
Previous month from beginning to end. |
|
DR_LAST_QUARTER
Previous quarter from beginning to end. |
|
DR_LAST_WEEK
Previous week from beginning to end. |
|
DR_LAST_YEAR
Previous year from beginning to end. |
|
DR_MONTH_TO_DATE
Current month to today's date. |
|
DR_QUARTER_TO_DATE
Current quarter to today's date. |
|
DR_THIS_MONTH
Current month from beginning to end. |
|
DR_THIS_QUARTER
Current quarter from beginning to end. |
|
DR_THIS_WEEK
Current week from beginning to end. |
|
DR_THIS_YEAR
Current year from beginning to end. |
|
DR_YEAR_TO_DATE
Current year to today's date. |
Field Summary | |
---|---|
static java.lang.String |
CONFIG_KEY
Key used to store and retrieve a date range from settings, parameters, URLs, etc. |
static DateRangeOption |
DEFAULT
The default date range to use if none is specified. |
Method Summary | |
---|---|
static DateRangeOption |
fromInt(int value)
Given an integer value, return the matching date range. |
static DateRangeOption |
fromKey(java.lang.String key)
Given a string key, return the matching date range. |
int |
getHotKey()
|
java.lang.String |
getResourceKey()
Return a resource key for a localized string describing this object. |
int |
getSortKey()
|
static DateRangeOption |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static DateRangeOption[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final DateRangeOption DR_YEAR_TO_DATE
public static final DateRangeOption DR_QUARTER_TO_DATE
public static final DateRangeOption DR_MONTH_TO_DATE
public static final DateRangeOption DR_THIS_YEAR
public static final DateRangeOption DR_THIS_QUARTER
public static final DateRangeOption DR_THIS_MONTH
public static final DateRangeOption DR_LAST_YEAR
public static final DateRangeOption DR_LAST_QUARTER
public static final DateRangeOption DR_LAST_MONTH
public static final DateRangeOption DR_LAST_12_MONTHS
public static final DateRangeOption DR_ALL_DATES
public static final DateRangeOption DR_CUSTOM_DATE
public static final DateRangeOption DR_THIS_WEEK
public static final DateRangeOption DR_LAST_30_DAYS
public static final DateRangeOption DR_LAST_365_DAYS
public static final DateRangeOption DR_LAST_WEEK
public static final DateRangeOption DR_LAST_1_DAY
Field Detail |
---|
public static final java.lang.String CONFIG_KEY
public static final DateRangeOption DEFAULT
Method Detail |
---|
public static final DateRangeOption[] values()
for(DateRangeOption c : DateRangeOption.values()) System.out.println(c);
public static DateRangeOption valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic java.lang.String getResourceKey()
DisplayableObject
getResourceKey
in interface DisplayableObject
public int getHotKey()
public int getSortKey()
public static DateRangeOption fromInt(int value)
DEFAULT
is
returned.
value
- The integer value to convert.
public static DateRangeOption fromKey(java.lang.String key)
DEFAULT
is
returned.
key
- The string key value to convert.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |