Class DateTime

java.lang.Object
org.gvsig.utils.DateTime

public class DateTime extends Object
This class contains static methods to manage Dates. It was principally created because of some problems doing the "String do DateTime" and the "DateTime to String" conversions.
Author:
Jorge Piera LlodrĂ¡ (piera_jor@gva.es)
  • Constructor Details

    • DateTime

      public DateTime()
  • Method Details

    • getCurrentDate

      public static Date getCurrentDate()
      returns the current date
      Returns:
      java.util.Date
    • dateToString

      public static String dateToString(Date dtK, String sFormat)
      It trnasforms one date in one String
      Parameters:
      dtK - Date
      sFormat - Date format. Example: "Y-m-d H:i:s.Z";
      Returns:
      A String
    • stringToDate

      public static Date stringToDate(String sDate)
      It transfoms one String in one Date
      Parameters:
      sDate - String
      Returns:
      Date