private long
time = System.currentTimeMillis();
private String mMonth;
mMonth = MyDateUtil.changeM(
time);
int i = Integer.parseInt(mMonth);
if (i == (
1 |
3 |
5 |
7 |
8 |
10 |
12)) {
mDay =
31;
}
else {
mDay =
30;
}
Log.e(
"1",
"run:--------->mDay : "+ mDay );
public class MyDateUtil {
public static
String change(long mHaomiao) {
DateFormat formatter
= new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss");
Date date = new Date(mHaomiao);
String mS
= formatter
.format(
date);
return mS;
}
public static
String changeYMD(long mHaomiao) {
DateFormat formatter
= new SimpleDateFormat(
"yyyy/MM/dd");
Date date = new Date(mHaomiao);
String mS
= formatter
.format(
date);
return mS;
}
public static
String changeM(long mHaomiao) {
DateFormat formatter
= new SimpleDateFormat(
"MM");
Date date = new Date(mHaomiao);
String mS
= formatter
.format(
date);
return mS;
}
public static
String changeD(long mHaomiao) {
DateFormat formatter
= new SimpleDateFormat(
"dd");
Date date = new Date(mHaomiao);
String mS
= formatter
.format(
date);
return mS;
}
public static
String changeH(long mHaomiao) {
DateFormat formatter
= new SimpleDateFormat(
"HH");
Date date = new Date(mHaomiao);
String mS
= formatter
.format(
date);
return mS;
}
}
请问log输出是?简述分析过程也可