diff options
author | Neil Fuller <nfuller@google.com> | 2014-03-12 14:04:46 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-12 14:04:47 +0000 |
commit | e6e7947cef6e6299d617b8efbe108d1c89a8f91d (patch) | |
tree | 5465183d691a7cfacc51c918cd9f15e672f7dc81 /luni | |
parent | 3537f5811df63fa05faeca2bb85364dd03322fca (diff) | |
parent | 15737123c4b241c331e0090d311afb9631c3cf1b (diff) | |
download | libcore-e6e7947cef6e6299d617b8efbe108d1c89a8f91d.zip libcore-e6e7947cef6e6299d617b8efbe108d1c89a8f91d.tar.gz libcore-e6e7947cef6e6299d617b8efbe108d1c89a8f91d.tar.bz2 |
Merge "Add 1.7 methods to TimeZone / SimpleTimeZone"
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/java/util/TimeZone.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/luni/src/main/java/java/util/TimeZone.java b/luni/src/main/java/java/util/TimeZone.java index c024e8d..48f11f9 100644 --- a/luni/src/main/java/java/util/TimeZone.java +++ b/luni/src/main/java/java/util/TimeZone.java @@ -403,6 +403,22 @@ public abstract class TimeZone implements Serializable, Cloneable { } /** + * Returns true if this timezone is in a daylight savings time period for or if it will be in at + * any time in the future. + * + * <p>The default implementation is equivalent to: + * <br />{@code return useDaylightTime() || inDaylightTime(new Date());} + * + * <p>See {@link #useDaylightTime()} and {@link #inDaylightTime(Date)} for more information. + * + * @since 1.7 + * @hide Until ready for an API update + */ + public boolean observesDaylightTime() { + return useDaylightTime() || inDaylightTime(new Date()); + } + + /** * Returns true if {@code time} is in a daylight savings time period for * this time zone. */ |