mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
时间格式化工具支持自定义设置单位
This commit is contained in:
parent
40c2b3ff87
commit
d0fdf42dcd
@ -31,10 +31,6 @@ import java.util.function.Function;
|
|||||||
public class BetweenFormatter implements Serializable {
|
public class BetweenFormatter implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
|
||||||
* 单位格式化器
|
|
||||||
*/
|
|
||||||
public static Function<Level, String> DEFAULT_LEVEL_FORMATTER = (level) -> level.name;
|
|
||||||
/**
|
/**
|
||||||
* 时长毫秒数
|
* 时长毫秒数
|
||||||
*/
|
*/
|
||||||
@ -55,7 +51,7 @@ public class BetweenFormatter implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 格式化器
|
* 格式化器
|
||||||
*/
|
*/
|
||||||
private Function<Level, String> levelFormatter = DEFAULT_LEVEL_FORMATTER;
|
private Function<Level, String> levelFormatter = Level::getName;
|
||||||
/**
|
/**
|
||||||
* 分隔符
|
* 分隔符
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user