Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lunasaw committed May 22, 2022
1 parent 6704f1e commit 3e50fbe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/com/luna/common/date/DateUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.luna.common.constant.StrPoolConstant;
import com.luna.common.text.ObjectUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.tuple.Pair;

import java.lang.management.ManagementFactory;
Expand Down Expand Up @@ -132,6 +133,15 @@ public static String formatTime(long time) {
return formatTime(new Date(time));
}

/**
* 日期路径 即年/月/日 如2018/08/08
*/
public static String datePath()
{
Date now = new Date();
return DateFormatUtils.format(now, "yyyy/MM/dd");
}

/**
* 返回自定义格式字符串
*/
Expand Down

0 comments on commit 3e50fbe

Please sign in to comment.