Package com.thingworx.common.utils
Class DateUtilities
java.lang.Object
com.thingworx.common.utils.DateUtilities
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class DateUtilities
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
dateIsIncluded
(org.joda.time.DateTime value, org.joda.time.DateTime start, org.joda.time.DateTime end) static boolean
dateTimeIsIncluded
(org.joda.time.DateTime value, org.joda.time.DateTime start, org.joda.time.DateTime end) static String
formatDate
(org.joda.time.DateTime value) static String
formatDate
(org.joda.time.DateTime value, String format) static String
formatDateTime
(org.joda.time.DateTime value) static String
formatDateTimeToGMT
(org.joda.time.DateTime dateTime) static String
formatExpiresDate
(org.joda.time.DateTime value) static String
formatPeriod
(org.joda.time.Period value) static String
formatRawDateTime
(long value) static org.joda.time.DateTime
parseDateTime
(String value) static org.joda.time.DateTime
parseDateTime
(String value, String format) static org.joda.time.DateTime
parseExpiresDate
(String value) static org.joda.time.Period
parsePeriod
(String value)
-
Constructor Details
-
DateUtilities
public DateUtilities()
-
-
Method Details
-
parseDateTime
@ThingworxExtensionApiMethod(since={6,6}) public static org.joda.time.DateTime parseDateTime(String value) throws Exception - Throws:
Exception
- If an error occurs
-
parseDateTime
@ThingworxExtensionApiMethod(since={6,6}) public static org.joda.time.DateTime parseDateTime(String value, String format) throws Exception - Throws:
Exception
- If an error occurs
-
formatExpiresDate
@ThingworxExtensionApiMethod(since={6,6}) public static String formatExpiresDate(org.joda.time.DateTime value) -
parseExpiresDate
@ThingworxExtensionApiMethod(since={6,6}) public static org.joda.time.DateTime parseExpiresDate(String value) -
formatDateTime
@ThingworxExtensionApiMethod(since={6,6}) public static String formatDateTime(org.joda.time.DateTime value) -
formatDate
@ThingworxExtensionApiMethod(since={6,6}) public static String formatDate(org.joda.time.DateTime value, String format) -
formatDate
@ThingworxExtensionApiMethod(since={6,6}) public static String formatDate(org.joda.time.DateTime value) -
parsePeriod
@ThingworxExtensionApiMethod(since={6,6}) public static org.joda.time.Period parsePeriod(String value) throws Exception - Throws:
Exception
- If an error occurs
-
formatPeriod
@ThingworxExtensionApiMethod(since={6,6}) public static String formatPeriod(org.joda.time.Period value) -
formatRawDateTime
-
dateIsIncluded
@ThingworxExtensionApiMethod(since={6,6}) public static boolean dateIsIncluded(org.joda.time.DateTime value, org.joda.time.DateTime start, org.joda.time.DateTime end) -
dateTimeIsIncluded
@ThingworxExtensionApiMethod(since={6,6}) public static boolean dateTimeIsIncluded(org.joda.time.DateTime value, org.joda.time.DateTime start, org.joda.time.DateTime end) -
formatDateTimeToGMT
@ThingworxExtensionApiMethod(since={9,7}) public static String formatDateTimeToGMT(org.joda.time.DateTime dateTime) - Parameters:
dateTime
- -DateTime
- Returns:
- -
String
-