summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2014-03-12 14:04:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-03-12 14:04:47 +0000
commite6e7947cef6e6299d617b8efbe108d1c89a8f91d (patch)
tree5465183d691a7cfacc51c918cd9f15e672f7dc81 /luni
parent3537f5811df63fa05faeca2bb85364dd03322fca (diff)
parent15737123c4b241c331e0090d311afb9631c3cf1b (diff)
downloadlibcore-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.java16
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.
*/