Class ContentFormatUtils


  • public class ContentFormatUtils
    extends Object
    util methods for parsing/converting data
    Author:
    hyanghee
    • Field Detail

      • DATE_PATTERN_TIMEZONE_GMT

        public static final String DATE_PATTERN_TIMEZONE_GMT
        model date format constants
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContentFormatUtils

        public ContentFormatUtils()
    • Method Detail

      • parseDate

        public static ZonedDateTime parseDate​(SimpleDateFormat format,
                                              String dateStr,
                                              String timeZone)
        parse the given date using the model date format and the timezone
        Parameters:
        format -
        dateStr -
        Returns:
        timeZone
      • getBooleanValue

        public static boolean getBooleanValue​(String str)
        get a boolean value given a string
        Parameters:
        str -
        Returns:
        boolean value
      • getIntValue

        public static int getIntValue​(String str)
        get integer value
        Parameters:
        str -
        Returns:
        int value