Class DateWrapper
- java.lang.Object
-
- org.schabi.newpipe.extractor.localization.DateWrapper
-
- All Implemented Interfaces:
java.io.Serializable
public class DateWrapper extends java.lang.Object implements java.io.Serializable
A wrapper class that provides a field to describe if the date/time is precise or just an approximation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DateWrapper(java.time.OffsetDateTime offsetDateTime)
DateWrapper(java.time.OffsetDateTime offsetDateTime, boolean isApproximation)
DateWrapper(java.util.Calendar calendar)
Deprecated.UseDateWrapper(OffsetDateTime)
instead.DateWrapper(java.util.Calendar calendar, boolean isApproximation)
Deprecated.UseDateWrapper(OffsetDateTime, boolean)
instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Calendar
date()
Deprecated.useoffsetDateTime()
instead.boolean
isApproximation()
java.time.OffsetDateTime
offsetDateTime()
-
-
-
Constructor Detail
-
DateWrapper
@Deprecated public DateWrapper(@Nonnull java.util.Calendar calendar)
Deprecated.UseDateWrapper(OffsetDateTime)
instead.
-
DateWrapper
@Deprecated public DateWrapper(@Nonnull java.util.Calendar calendar, boolean isApproximation)
Deprecated.UseDateWrapper(OffsetDateTime, boolean)
instead.
-
DateWrapper
public DateWrapper(@Nonnull java.time.OffsetDateTime offsetDateTime)
-
DateWrapper
public DateWrapper(@Nonnull java.time.OffsetDateTime offsetDateTime, boolean isApproximation)
-
-
Method Detail
-
date
@Deprecated @Nonnull public java.util.Calendar date()
Deprecated.useoffsetDateTime()
instead.- Returns:
- the wrapped date/time as a
Calendar
.
-
offsetDateTime
@Nonnull public java.time.OffsetDateTime offsetDateTime()
- Returns:
- the wrapped date/time.
-
isApproximation
public boolean isApproximation()
- Returns:
- if the date is considered is precise or just an approximation (e.g. service only returns an approximation like 2 weeks ago instead of a precise date).
-
-