Class DateUtils

  • All Implemented Interfaces:

    
    public class DateUtils
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static DateUtils getInstance()
      int dateDiffer(long d) Calculate the difference in seconds between two timestamps
      String formatDurationTime(long duration) Convert timestamp to time format
      String getCreateFileName(String prefix) Create file name from timestamp
      String cdTime(long sTime, long eTime) Calculate the time interval between two timestamps
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • dateDiffer

         int dateDiffer(long d)

        Calculate the difference in seconds between two timestamps

      • formatDurationTime

         String formatDurationTime(long duration)

        Convert timestamp to time format

      • getCreateFileName

         String getCreateFileName(String prefix)

        Create file name from timestamp

        Parameters:
        prefix - name prefix
      • cdTime

         String cdTime(long sTime, long eTime)

        Calculate the time interval between two timestamps