Package records.util

Class Convert

java.lang.Object
records.util.Convert

public class Convert extends Object
  • Constructor Details

    • Convert

      public Convert()
  • Method Details

    • DateToLocalDate

      public static LocalDate DateToLocalDate(Date date)
      Converts a java.util.Date object to java.time.LocalDate.
      Parameters:
      date - the Date object to convert
      Returns:
      the corresponding LocalDate object
    • StringToLocalDate_yyyyMMdd

      public static LocalDate StringToLocalDate_yyyyMMdd(String date)
      Converts a string in "yyyy-MM-dd" format to LocalDate.
      Parameters:
      date - the string representing the date
      Returns:
      the corresponding LocalDate object
    • StringToLocalTime

      public static LocalTime StringToLocalTime(String time)
      Converts a string representing time to LocalTime.
      Parameters:
      time - the string representing the time
      Returns:
      the corresponding LocalTime object
    • doubleToString

      public static String doubleToString(Double value)
      Converts a Double value to a string with two decimal places.
      Parameters:
      value - the Double value to convert
      Returns:
      the formatted string
    • StringToDouble

      public static Double StringToDouble(String value)
      Converts a string to a Double value.
      Parameters:
      value - the string to convert
      Returns:
      the corresponding Double value
    • MonthValueToString

      public static String MonthValueToString(int value)
      Converts a month value to a string with two digits.
      Parameters:
      value - the month value to convert
      Returns:
      the formatted string
    • roundToTwoDecimalPlaces

      public static double roundToTwoDecimalPlaces(double value)
      Rounds a double value to two decimal places.
      Parameters:
      value - the value to round
      Returns:
      the rounded value