public class

DateUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.util.date.DateUtil

Class Overview

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.

Summary

Public Constructors
DateUtil()
Public Methods
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.

[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DateUtil ()

Public Methods

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

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