Update
This commit is contained in:
1 parent
e77b7b4350
commit
8182b9e212
2 files changed
+11
-1
No files matched your search
Binary file not shown.
@@ -20,14 +20,24 @@ public class DateFormatOutput {
|
||||
yearStr += "年";
|
||||
if (month < 10)
|
||||
monthStr = num[month] + "月";
|
||||
else if (month == 10)
|
||||
monthStr = "十月";
|
||||
else
|
||||
monthStr = "十" + num[month % 10] + "月";
|
||||
if (date < 10)
|
||||
dateStr = num[date] + "日";
|
||||
else if (date == 10)
|
||||
dateStr = "十日";
|
||||
else if (date < 20)
|
||||
dateStr = "十" + num[date % 10] + "日";
|
||||
else if (date == 20)
|
||||
dateStr = "二十日";
|
||||
else if (date < 30)
|
||||
dateStr = "二十" + num[date % 10] + "日";
|
||||
else if (date == 30)
|
||||
dateStr = "三十日";
|
||||
else
|
||||
dateStr = num[date / 10] + "十" + num[date % 10] + "日";
|
||||
dateStr = "三十" + num[date % 10] + "日";
|
||||
System.out.println(yearStr + monthStr + dateStr);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user