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 Summary
Fields Modifier and Type Field Description static String
DATE_PATTERN_TIMEZONE_GMT
model date format constants
-
Constructor Summary
Constructors Constructor Description ContentFormatUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
getBooleanValue(String str)
get a boolean value given a stringstatic int
getIntValue(String str)
get integer valuestatic ZonedDateTime
parseDate(SimpleDateFormat format, String dateStr, String timeZone)
parse the given date using the model date format and the timezone
-
-
-
Field Detail
-
DATE_PATTERN_TIMEZONE_GMT
public static final String DATE_PATTERN_TIMEZONE_GMT
model date format constants- See Also:
- Constant Field Values
-
-
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
-
-