622 lines
16 KiB
Smali
622 lines
16 KiB
Smali
.class Lcom/google/android/material/datepicker/DateStrings;
|
|
.super Ljava/lang/Object;
|
|
.source "DateStrings.java"
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 34
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static getDateRangeString(Ljava/lang/Long;Ljava/lang/Long;)Landroidx/core/util/Pair;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Long;",
|
|
")",
|
|
"Landroidx/core/util/Pair<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 136
|
|
invoke-static {p0, p1, v0}, Lcom/google/android/material/datepicker/DateStrings;->getDateRangeString(Ljava/lang/Long;Ljava/lang/Long;Ljava/text/SimpleDateFormat;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getDateRangeString(Ljava/lang/Long;Ljava/lang/Long;Ljava/text/SimpleDateFormat;)Landroidx/core/util/Pair;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/text/SimpleDateFormat;",
|
|
")",
|
|
"Landroidx/core/util/Pair<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 158
|
|
invoke-static {v0, v0}, Landroidx/core/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
if-nez p0, :cond_1
|
|
|
|
.line 160
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide p0
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/google/android/material/datepicker/DateStrings;->getDateString(JLjava/text/SimpleDateFormat;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v0, p0}, Landroidx/core/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
if-nez p1, :cond_2
|
|
|
|
.line 162
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide p0
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/google/android/material/datepicker/DateStrings;->getDateString(JLjava/text/SimpleDateFormat;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0, v0}, Landroidx/core/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 165
|
|
:cond_2
|
|
invoke-static {}, Lcom/google/android/material/datepicker/UtcDates;->getTodayCalendar()Ljava/util/Calendar;
|
|
|
|
move-result-object v0
|
|
|
|
.line 166
|
|
invoke-static {}, Lcom/google/android/material/datepicker/UtcDates;->getUtcCalendar()Ljava/util/Calendar;
|
|
|
|
move-result-object v1
|
|
|
|
.line 167
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
.line 168
|
|
invoke-static {}, Lcom/google/android/material/datepicker/UtcDates;->getUtcCalendar()Ljava/util/Calendar;
|
|
|
|
move-result-object v2
|
|
|
|
.line 169
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v2, v3, v4}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 172
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-direct {v0, v1, v2}, Ljava/util/Date;-><init>(J)V
|
|
|
|
.line 173
|
|
new-instance p0, Ljava/util/Date;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-direct {p0, v1, v2}, Ljava/util/Date;-><init>(J)V
|
|
|
|
.line 175
|
|
invoke-virtual {p2, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 174
|
|
invoke-static {p1, p0}, Landroidx/core/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_3
|
|
const/4 p2, 0x1
|
|
|
|
.line 176
|
|
invoke-virtual {v1, p2}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v2, p2}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v2
|
|
|
|
if-ne v3, v2, :cond_5
|
|
|
|
.line 177
|
|
invoke-virtual {v1, p2}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, p2}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result p2
|
|
|
|
if-ne v1, p2, :cond_4
|
|
|
|
.line 179
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v0, v1, p0}, Lcom/google/android/material/datepicker/DateStrings;->getMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2, v0}, Lcom/google/android/material/datepicker/DateStrings;->getMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 178
|
|
invoke-static {p0, p1}, Landroidx/core/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 182
|
|
:cond_4
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v0, v1, p0}, Lcom/google/android/material/datepicker/DateStrings;->getMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2, v0}, Lcom/google/android/material/datepicker/DateStrings;->getYearMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 181
|
|
invoke-static {p0, p1}, Landroidx/core/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 186
|
|
:cond_5
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v0, v1, p0}, Lcom/google/android/material/datepicker/DateStrings;->getYearMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, p2, v0}, Lcom/google/android/material/datepicker/DateStrings;->getYearMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 185
|
|
invoke-static {p0, p1}, Landroidx/core/util/Pair;->create(Ljava/lang/Object;Ljava/lang/Object;)Landroidx/core/util/Pair;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getDateString(J)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 107
|
|
invoke-static {p0, p1, v0}, Lcom/google/android/material/datepicker/DateStrings;->getDateString(JLjava/text/SimpleDateFormat;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getDateString(JLjava/text/SimpleDateFormat;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 122
|
|
invoke-static {}, Lcom/google/android/material/datepicker/UtcDates;->getTodayCalendar()Ljava/util/Calendar;
|
|
|
|
move-result-object v0
|
|
|
|
.line 123
|
|
invoke-static {}, Lcom/google/android/material/datepicker/UtcDates;->getUtcCalendar()Ljava/util/Calendar;
|
|
|
|
move-result-object v1
|
|
|
|
.line 124
|
|
invoke-virtual {v1, p0, p1}, Ljava/util/Calendar;->setTimeInMillis(J)V
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 127
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
.line 128
|
|
invoke-virtual {p2, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const/4 p2, 0x1
|
|
|
|
.line 129
|
|
invoke-virtual {v0, p2}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v1, p2}, Ljava/util/Calendar;->get(I)I
|
|
|
|
move-result p2
|
|
|
|
if-ne v0, p2, :cond_1
|
|
|
|
.line 130
|
|
invoke-static {p0, p1}, Lcom/google/android/material/datepicker/DateStrings;->getMonthDay(J)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 132
|
|
:cond_1
|
|
invoke-static {p0, p1}, Lcom/google/android/material/datepicker/DateStrings;->getYearMonthDay(J)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getMonthDay(J)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 64
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/google/android/material/datepicker/DateStrings;->getMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 78
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
.line 79
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getAbbrMonthDayFormat(Ljava/util/Locale;)Landroid/icu/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Landroid/icu/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 81
|
|
:cond_0
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getMediumNoYear(Ljava/util/Locale;)Ljava/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getMonthDayOfWeekDay(J)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 85
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/google/android/material/datepicker/DateStrings;->getMonthDayOfWeekDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getMonthDayOfWeekDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 89
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
.line 90
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getAbbrMonthWeekdayDayFormat(Ljava/util/Locale;)Landroid/icu/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Landroid/icu/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 92
|
|
:cond_0
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getFullFormat(Ljava/util/Locale;)Ljava/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getYearMonth(Landroid/content/Context;J)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 38
|
|
invoke-static {}, Ljava/util/TimeZone;->getDefault()Ljava/util/TimeZone;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1, p2}, Ljava/util/TimeZone;->getOffset(J)I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v0, v0
|
|
|
|
sub-long/2addr p1, v0
|
|
|
|
const/16 v0, 0x24
|
|
|
|
.line 39
|
|
invoke-static {p0, p1, p2, v0}, Landroid/text/format/DateUtils;->formatDateTime(Landroid/content/Context;JI)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getYearMonthDay(J)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 43
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/google/android/material/datepicker/DateStrings;->getYearMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getYearMonthDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 57
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
.line 58
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getYearAbbrMonthDayFormat(Ljava/util/Locale;)Landroid/icu/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Landroid/icu/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 60
|
|
:cond_0
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getMediumFormat(Ljava/util/Locale;)Ljava/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getYearMonthDayOfWeekDay(J)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 96
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/google/android/material/datepicker/DateStrings;->getYearMonthDayOfWeekDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static getYearMonthDayOfWeekDay(JLjava/util/Locale;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 100
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
.line 101
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getYearAbbrMonthWeekdayDayFormat(Ljava/util/Locale;)Landroid/icu/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Landroid/icu/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 103
|
|
:cond_0
|
|
invoke-static {p2}, Lcom/google/android/material/datepicker/UtcDates;->getFullFormat(Ljava/util/Locale;)Ljava/text/DateFormat;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Ljava/util/Date;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/util/Date;-><init>(J)V
|
|
|
|
invoke-virtual {p2, v0}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|