类 NkDateSpEL

java.lang.Object
cn.nkpro.elcube.co.spel.NkDateSpEL
所有已实现的接口:
NkCustomObject, NkSpELInjection

@Component("SpELdate") public class NkDateSpEL extends Object implements NkSpELInjection
date:2021/12/22 description: 1、可以获取当前日期返回秒
作者:
:zxc
  • 构造器详细资料

    • NkDateSpEL

      public NkDateSpEL()
  • 方法详细资料

    • now

      public Long now()
      description:获取当前日期返回秒
      返回:
      时间秒
    • today

      public Long today()
      description:获取当前日期返回秒
      返回:
      时间秒
    • format

      public String format(Long seconds, String format)
      description:格式化日期
      返回:
      时间秒
    • get

      public Integer get(int field)
    • get

      public Integer get(int field, long date)
    • diff

      public Long diff(Long date1, Long date2)
      计算两个日期相差的天数
      参数:
      date1 - date1
      date2 - date2
      返回:
      相差的天数
    • dateAdd

      public Long dateAdd(long date1, int day)
    • monthAdd

      public Long monthAdd(long date1, int month)
    • yearAdd

      public Long yearAdd(long date1, int year)
    • parse

      public Long parse(String str)
    • add

      @Deprecated public Long add(Long... dates) throws NkException
      已过时。
      抛出:
      NkException
    • sub

      @Deprecated public Long sub(Long... dates) throws NkException
      已过时。
      抛出:
      NkException
    • mul

      @Deprecated public Long mul(String timeUnit, Object time) throws NkException
      已过时。
      抛出:
      NkException