Class ContentFormatUtils

java.lang.Object
org.craftercms.studio.impl.v1.util.ContentFormatUtils

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

    • DATE_PATTERN_TIMEZONE_GMT

      public static final String DATE_PATTERN_TIMEZONE_GMT
      model date format constants
      See Also:
  • Constructor Details

    • ContentFormatUtils

      public ContentFormatUtils()
  • Method Details

    • 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