Class DateUtilities
java.lang.Object
com.inductiveautomation.ignition.common.script.builtin.DateUtilities
Date and time functions for use in scripting, to make dealing with java.util.Date objects less painful
from python.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Date
static Date
static Date
static Date
addMinutes
(Date d, int value) static Date
static Date
addSeconds
(Date d, int value) static Date
static Date
static int
daysBetween
(Date a, Date b) static String
static String
static Date
fromMillis
(long millis) static int
static Date
getDate
(int year, int month, int day) static int
static int
getDayOfWeek
(Date d) static int
getDayOfYear
(Date d) static int
static int
static int
static int
static int
static int
getQuarter
(Date d) static int
static String
static double
static double
getTimezoneOffset
(Date date) static double
static int
static int
hoursBetween
(Date a, Date b) static boolean
static boolean
static boolean
static boolean
static boolean
isDaylightTime
(Date date) static Date
static long
millisBetween
(Date a, Date b) static int
minutesBetween
(Date a, Date b) static int
monthsBetween
(Date a, Date b) static Date
now()
static Date
static int
secondsBetween
(Date a, Date b) static Date
static long
static int
weeksBetween
(Date a, Date b) static int
yearsBetween
(Date a, Date b)
-
Constructor Details
-
DateUtilities
public DateUtilities()
-
-
Method Details
-
now
-
fromMillis
-
toMillis
-
getTimezoneOffset
public static double getTimezoneOffset() -
getTimezoneOffset
-
getTimezoneRawOffset
public static double getTimezoneRawOffset() -
getTimezone
-
isDaylightTime
public static boolean isDaylightTime() -
isDaylightTime
-
midnight
-
setTime
-
getDate
-
addMillis
-
addSeconds
-
addMinutes
-
addHours
-
addDays
-
addWeeks
-
addMonths
-
addYears
-
millisBetween
-
secondsBetween
-
minutesBetween
-
hoursBetween
-
daysBetween
-
weeksBetween
-
monthsBetween
-
yearsBetween
-
format
-
format
-
isBefore
-
isAfter
-
isBetween
-
getQuarter
-
getYear
-
getMonth
-
getDayOfMonth
-
getDayOfYear
-
getDayOfWeek
-
getHour12
-
getAMorPM
-
getHour24
-
getMinute
-
getSecond
-
getMillis
-
parse
@Nullable public static Date parse(org.python.core.PyObject[] pyArgs, String[] keywords) throws ParseException - Throws:
ParseException
-