mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
修复:格式化为中文日期时,0被处理为空串
This commit is contained in:
parent
db5bd528ce
commit
4b02bc7287
@ -164,6 +164,11 @@ public class NumberChineseFormatter {
|
||||
*/
|
||||
public static String formatThousand(int amount, boolean isUseTraditional){
|
||||
Assert.checkBetween(amount, -999, 999, "Number support only: (-999 ~ 999)!");
|
||||
|
||||
// thousandToChinese方法对0不处理,此处直接返回"零"
|
||||
if (amount == 0) {
|
||||
return String.valueOf(DIGITS[0]);
|
||||
}
|
||||
final String chinese = thousandToChinese(amount, isUseTraditional);
|
||||
if(amount < 20 && amount > 10){
|
||||
// "十一"而非"一十一"
|
||||
|
Loading…
x
Reference in New Issue
Block a user