Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Type | Name and description |
---|---|
static Duration |
getDay(Integer self) |
static Duration |
getDaylightSavingsOffset(Date self) Get the DST offset (if any) for the default locale and the given date. |
static Duration |
getDaylightSavingsOffset(BaseDuration self) |
static Duration |
getDays(Integer self) |
static TimeDuration |
getHour(Integer self) |
static TimeDuration |
getHours(Integer self) |
static TimeDuration |
getMillisecond(Integer self) |
static TimeDuration |
getMilliseconds(Integer self) |
static TimeDuration |
getMinute(Integer self) |
static TimeDuration |
getMinutes(Integer self) |
static DatumDependentDuration |
getMonth(Integer self) |
static DatumDependentDuration |
getMonths(Integer self) |
static Duration |
getRelativeDaylightSavingsOffset(Date self, Date other) Return a Duration representing the DST difference (if any) between two dates. |
static TimeDuration |
getSecond(Integer self) |
static TimeDuration |
getSeconds(Integer self) |
static TimeZone |
getTimeZone(Date self) Retrieves the default TimeZone for a date by using the default Locale settings. |
static Duration |
getWeek(Integer self) |
static Duration |
getWeeks(Integer self) |
static DatumDependentDuration |
getYear(Integer self) |
static DatumDependentDuration |
getYears(Integer self) |
static Date |
minus(Date date, BaseDuration duration) |
static TimeDuration |
minus(Date lhs, Date rhs) Subtract one date from the other. |
static Date |
plus(Date date, BaseDuration duration) |
Get the DST offset (if any) for the default locale and the given date.
self
- a DateReturn a Duration representing the DST difference (if any) between two dates. i.e. if one date is before the DST changeover, and the other date is after, the resulting duration will represent the DST offset.
self
- a Dateother
- another Date Retrieves the default TimeZone for a date by using the default Locale
settings. Recommended that you use TimeZone.getDefault()
instead.
self
- a DateSubtract one date from the other.
lhs
- a Daterhs
- another Date