Class DateConverter

java.lang.Object
org.verapdf.metadata.fixer.gf.utils.DateConverter

public class DateConverter extends Object
Utility class for converting dates to different formats
Author:
Maksim Bezrukov
  • Constructor Details

    • DateConverter

      public DateConverter()
  • Method Details

    • toXMPDateFormat

      public static String toXMPDateFormat(Calendar calendar)
      Convert Calendar object to string representation in xmp date form
      Parameters:
      calendar - passed date
      Returns:
      string representation of passed date
    • toXMPDateFormat

      public static String toXMPDateFormat(Date time)
      Convert Date object to string representation in xmp date form
      Parameters:
      time - passed date
      Returns:
      string representation of passed date
    • toXMPDateFormat

      public static String toXMPDateFormat(String date)
      Convert string date representation to string representation in xmp date form.
      Parameters:
      date - passed date
      Returns:
      XMP representation of passed date
    • toCalendar

      public static Calendar toCalendar(String date)
      Convert string representation of date to Calendar object
      Parameters:
      date - passed string date
      Returns:
      Calendar date
    • toPDFDateFormat

      public static String toPDFDateFormat(String date)
      Convert string representation of date to string representation of date in PDF format
      Parameters:
      date - passed date
      Returns:
      PDF string representation of passed date
    • toPDFDateFormat

      public static String toPDFDateFormat(Calendar date)
      Convert Calendar date to string representation of date in PDF format
      Parameters:
      date - passed date
      Returns:
      PDF string representation of date