Package | Description |
---|---|
net.degreedays.api.data |
For specifying and receiving degree-day data and temperature data from the API.
|
net.degreedays.time |
Classes for working with dates, times, and date-ranges in the context of degree days and energy data.
|
Modifier and Type | Method and Description |
---|---|
Day |
TimeSeriesDataValue.day()
Returns a non-null
Day object indicating the YYYY-MM-DD date
that this TimeSeriesDataValue falls on in the local
time-zone of the weather station. |
abstract Day |
DatedDataValue.firstDay()
Returns the non-null first
Day of the period covered by this
DatedDataValue . |
abstract Day |
DatedDataValue.lastDay()
Returns the non-null last
Day of the period covered by this
DatedDataValue . |
Modifier and Type | Method and Description |
---|---|
TimeSeriesDataValue[] |
TimeSeriesDataSet.getValuesWithin(Day day)
Returns a non-null, possibly-empty, chronologically-ordered array of the
TimeSeriesDataValue objects from this
TimeSeriesDataSet that fall within the specified
Day . |
static DatedDataValue |
DatedDataValue.of(double value,
double percentageEstimated,
Day singleDay)
Returns a non-null
DatedDataValue object with the specified
value and percentage estimated, and covering just the specified
Day . |
Modifier and Type | Method and Description |
---|---|
Day |
OffsetDayTime.day()
Returns a non-null
Day object representing the YYYY-MM-DD
component of this OffsetDayTime . |
Day |
DayTime.day()
Returns a non-null
Day object representing the YYYY-MM-DD
component of this DayTime . |
Day |
DayRange.dayAt(int zeroBasedIndex)
Returns the non-null
Day at the specified zero-based index
within this DayRange . |
Day |
DayRange.first()
Returns the non-null first
Day in this
DayRange . |
static Day |
Day.fromCalendar(java.util.Calendar calendar)
Returns the non-null
Day object represented by the
YEAR , MONTH , and DAY_OF_MONTH
fields of calendar . |
static Day |
Day.fromDateUtc(java.util.Date date)
Returns the non-null
Day object represented by
date , as interpreted in the context of the UTC time-zone. |
static Day |
Day.fromString(java.lang.String dateString)
Parses a string date in ISO
YYYY-MM-DD format (the format
used by XML schema's date type), or YYYYMMDD format. |
Day |
DayRange.last()
Returns the non-null last
Day in this DayRange . |
Day |
Day.minusDays(int numberOfDays)
Returns the non-null
Day that comes the specified
numberOfDays before this Day in the calendar. |
Day |
Day.minusMonths(int numberOfMonths)
Returns the non-null
Day that comes the specified
numberOfMonths before this Day in the calendar. |
Day |
Day.minusWeeks(int numberOfWeeks)
Returns the non-null
Day that comes the specified
numberOfWeeks before this Day in the calendar. |
Day |
Day.minusYears(int numberOfYears)
Returns the non-null
Day that comes the specified
numberOfYears before this Day in the calendar. |
Day |
Day.next()
Returns the non-null
Day that comes immediately after this
Day in the calendar. |
static Day |
Day.of(int year,
int monthOfYearWithJanAs1,
int dayOfMonth)
Returns a non-null
Day object representing a date with the
specified year, month, and day. |
Day |
Day.plusDays(int numberOfDays)
Returns the non-null
Day that comes the specified
numberOfDays after this Day in the calendar. |
Day |
Day.plusMonths(int numberOfMonths)
Returns the non-null
Day that comes the specified
numberOfMonths after this Day in the calendar. |
Day |
Day.plusWeeks(int numberOfWeeks)
Returns the non-null
Day that comes the specified
numberOfWeeks after this Day in the calendar. |
Day |
Day.plusYears(int numberOfYears)
Returns the non-null
Day that comes the specified
numberOfYears after this Day in the calendar. |
Day |
Day.previous()
Returns the non-null
Day that comes immediately before this
Day in the calendar. |
static Day |
Day.todayInSystemTimeZone()
Returns the non-null
Day object representing the current
date in the system time-zone. |
static Day |
Day.todayInUtc()
Returns the non-null
Day object representing the current
date in the UTC time-zone. |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<Day> |
DayRange.iterator() |
Modifier and Type | Method and Description |
---|---|
boolean |
Day.after(Day comparisonDay)
Returns
true if this Day object is
chronologically after comparisonDay ; false
otherwise. |
boolean |
Day.before(Day comparisonDay)
Returns
true if this Day object is
chronologically before comparisonDay ; false
otherwise. |
int |
Day.compareTo(Day comparisonDay)
Compares two
Day objects for chronological ordering. |
boolean |
DayRange.contains(Day testDay)
Returns
true if the specified Day is
contained within this DayRange ; false
otherwise. |
int |
Day.daysAfter(Day comparisonDay)
Returns the number of days that this
Day is after
comparisonDay , which will be negative if this
Day comes first chronologically. |
int |
Day.daysBefore(Day comparisonDay)
Returns the number of days that this
Day is before
comparisonDay , which will be negative if
comparisonDay comes first chronologically. |
DayRange |
DayRange.greedyUnion(Day dayToIncludeInUnion)
Returns the non-null
DayRange that includes all the days
within this DayRange , the specified Day
(dayToIncludeInUnion ), and any days between. |
int |
MaybeEmptyDayRanges.indexOf(Day day)
Returns the index of the
DayRange that contains
day , or -1 if no such DayRange
exists in this chronologically-ordered set. |
int |
DayRange.indexOf(Day day)
Returns the index of the specified
Day within this
DayRange , or -1 if it is not contained within this
DayRange . |
static DayTime |
DayTime.of(Day day,
Time time)
Returns a non-null
DayTime object with the specified
Day and Time . |
static OffsetDayTime |
OffsetDayTime.of(Day day,
Time time,
int offsetTotalMinutes)
Returns a non-null
OffsetDayTime object with the specified
local date, time, and UTC offset. |
DayRange |
Day.to(Day firstOrLastDayInRange)
Returns the non-null
DayRange covering (inclusively) the
days between this Day and firstOrLastDayInRange
(which can be before, after, or equal to this Day ). |
Constructor and Description |
---|
DayRange(Day first,
Day last)
Constructs a
DayRange object that starts on the specified
first day and ends on the specified last day. |
DayTime(Day day,
Time time)
Constructs a
DayTime object with the specified
Day and Time . |
OffsetDayTime(Day day,
Time time,
int offsetTotalMinutes)
Constructs an
OffsetDayTime object with the specified local
date, time, and UTC offset. |
See www.degreedays.net/api/ for more about the Degree Days.net API.
You can sign up for a Degree Days.net API account and read the integration guide that is useful and applicable whether you are using Java or not.