utils
Class TimeUtils

Package class diagram package TimeUtils
java.lang.Object
  extended by utils.TimeUtils

public final class TimeUtils
extends Object

Provides some methods to transfer counter to day, hours, minutes, date etc.

Author:
Ondrej Burkert

Constructor Summary
TimeUtils()
           
 
Method Summary
static String counterToDate(int counter)
           
static int counterToDays(int counter)
           
static double counterToHours(int counter)
          day hour - something between 0-24 only int
static String counterToTime(int counter)
           
static long getTimeInMilis()
          Returns system time in miliseconds.
static int hourInTicksOfLogic()
           
static boolean isDay(int counter, int i)
          returns true if the counter represents exactly to given day.
static boolean isHour(int counter)
           
static boolean isHour(int counter, int i)
          returns true if the counter represents exactly to given hour of a day.
static int minutesToTicksOfLogic(double minutes)
           
static String now(String dateFormat)
          Gets current system time according to the input dateFormat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeUtils

public TimeUtils()
Method Detail

counterToDays

public static int counterToDays(int counter)

counterToHours

public static double counterToHours(int counter)
day hour - something between 0-24 only int

Parameters:
counter -
Returns:

isHour

public static boolean isHour(int counter)

isHour

public static boolean isHour(int counter,
                             int i)
returns true if the counter represents exactly to given hour of a day.

Parameters:
counter -
i -
Returns:

isDay

public static boolean isDay(int counter,
                            int i)
returns true if the counter represents exactly to given day.

Parameters:
counter -
i -
Returns:

minutesToTicksOfLogic

public static int minutesToTicksOfLogic(double minutes)

counterToDate

public static String counterToDate(int counter)

hourInTicksOfLogic

public static int hourInTicksOfLogic()

counterToTime

public static String counterToTime(int counter)

now

public static String now(String dateFormat)
Gets current system time according to the input dateFormat.

Parameters:
dateFormat - input dateFormat
Returns:
current date, time

getTimeInMilis

public static long getTimeInMilis()
Returns system time in miliseconds.

Returns:
current time in ms


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.