org.test4j.tools.commons
类 DateHelper

java.lang.Object
  继承者 org.test4j.tools.commons.DateHelper

public class DateHelper
extends Object


构造方法摘要
DateHelper()
           
 
方法摘要
static String currDateStr()
          返回当前日期的默认格式("yyyy-MM-dd")字符串
static String currDateTimeStr()
          返回当前日期时间的默认格式("yyyy-MM-dd mm:hh:SS")字符串
static String currDateTimeStr(String format)
          返回当前时间的格式化字符串
static SimpleDateFormat getDateFormat(String input)
           
static Date now()
           
static Date parse(String str)
           
static String toDateTimeStr(Date date, String format)
          返回指定时间的格式化字符串
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

DateHelper

public DateHelper()
方法详细信息

currDateStr

public static final String currDateStr()
返回当前日期的默认格式("yyyy-MM-dd")字符串

返回:

currDateTimeStr

public static final String currDateTimeStr()
返回当前日期时间的默认格式("yyyy-MM-dd mm:hh:SS")字符串

返回:

currDateTimeStr

public static final String currDateTimeStr(String format)
返回当前时间的格式化字符串

参数:
format -
返回:

toDateTimeStr

public static final String toDateTimeStr(Date date,
                                         String format)
返回指定时间的格式化字符串

参数:
format -
返回:

now

public static final Date now()

getDateFormat

public static final SimpleDateFormat getDateFormat(String input)

parse

public static final Date parse(String str)


Copyright © 2013. All rights reserved.