com.atlassian.jira.functest.framework.util.date
Class DateUtil

java.lang.Object
  extended by com.atlassian.jira.functest.framework.util.date.DateUtil

public class DateUtil
extends Object

Some utility methods for manipulating dates in functional tests.

This is often required to make sure that func tests run okay when executed in different time zones.

Since:
v4.1

Constructor Summary
DateUtil()
           
 
Method Summary
static String dateAsMillis(int year, int month, int day, int hour, int minute)
          Returns a string representing the given date in milliseconds, for example 123456789.
static String dateAsTimestamp(int year, int month, int day, int hour, int minute)
          Returns a string representing the given date in the format suitable for timestamp fields in the data XML file, for example 2008-06-02 09:43:58.788.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateUtil

public DateUtil()
Method Detail

dateAsTimestamp

public static String dateAsTimestamp(int year,
                                     int month,
                                     int day,
                                     int hour,
                                     int minute)

Returns a string representing the given date in the format suitable for timestamp fields in the data XML file, for example 2008-06-02 09:43:58.788.

Parameters:
year - year
month - month
day - day
hour - hour
minute - minute
Returns:
String timestamp representation

dateAsMillis

public static String dateAsMillis(int year,
                                  int month,
                                  int day,
                                  int hour,
                                  int minute)

Returns a string representing the given date in milliseconds, for example 123456789.

Parameters:
year - year
month - month
day - day
hour - hour
minute - minute
Returns:
String millisecond representation


Copyright © 2002-2012 Atlassian. All Rights Reserved.