/** function return current date or time depending on the format which you are want. Just send a format and the function will return the current date or time depending on the format which you are sent (e.g. getDisplayedDateFormat("yyyy-mm-dd") it will return 2013-11-18 */
public static String getDisplayedDateFormat(String dateFormat)
{
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
return sdf.format(cal.getTime());
}

/** function return the index of current day in this week (if today is Sunday it will retun 1 and if the today is Monday this function will return 2 and so on... till Saturday it will return 7) */
public static int getCurrentDayOfWeek()
{
Calendar cal = Calendar.getInstance();
return cal.get(Calendar.DAY_OF_WEEK);
}

/** function will return current date and time as an oracle Date object */
public static oracle.jbo.domain.Date getCurrentOracleDateTime()
{
return new oracle.jbo.domain.Date(new java.sql.Timestamp(System.currentTimeMillis()));
}

/** function will return current date and time as an oracle Timestamp object */
public static oracle.jbo.domain.Timestamp getCurrentOracleTimestampDateTime()
{
return new oracle.jbo.domain.Timestamp(new java.util.Date().getTime());
}

/** function receive oracle date and return true or false (if sent date greater than current date it will return true but if sent date less than or equal current date it will return false */
public static boolean isDateGreaterThanCurrentDate(oracle.jbo.domain.Date d)
{
if(d == null)
return false;

/** function receive two oracle dates and return true or false (if first date greater than second date it will return true but if first date less than or equal second date it will return false */
public static boolean isFirstDateGreaterThanSecondDate(oracle.jbo.domain.Date d1, oracle.jbo.domain.Date d2)
{
if(d1 == null && d2 == null)
return false;