Class DateDeserializer

java.lang.Object
com.markvarga21.studentmanager.util.DateDeserializer

public final class DateDeserializer extends Object
A utility class which is used to deserialize the String representation of a date.
  • Field Details

    • PASSPORT_DATE_COMPONENT_LENGTH

      public static final int PASSPORT_DATE_COMPONENT_LENGTH
      The length of the standard passport date components.
      See Also:
  • Method Details

    • mapDateStringToLocalDate

      public static LocalDate mapDateStringToLocalDate(String dateString)
      Maps the String representation of a date to a LocalDate object.
      Parameters:
      dateString - The String representation of a date.
      Returns:
      The converted LocalDate object.
    • mapStandardPassportDateStringToLocalDate

      public static LocalDate mapStandardPassportDateStringToLocalDate(String dateString)
      Maps a standard passport date string to a LocalDate.
      Parameters:
      dateString - The date string.
      Returns:
      The mapped LocalDate from the string itself.
    • mapLocalDateToDateString

      public static String mapLocalDateToDateString(LocalDate date)
      Maps a LocalDate object to a String.
      Parameters:
      date - The LocalDate object.
      Returns:
      The String representation of the date.