IDate - TCreopargh/CraftTweakerIntegration GitHub Wiki
IDate is an interface that allows access to system time and date formatting.
You can get an instance of IDate from DateUtil.
IDate is internally implemented with java.util.Calendar.
Importing class
import mods.ctintegration.date.IDate;
Zen Getter | Return Type | Zen Setter | Setter argument | Description |
---|---|---|---|---|
timeInMillis | long | timeInMillis | long | get/set the total milliseconds has passed since 1/1/1970 |
year | int | year | int | |
month | int | month | int | |
day | int | day | int | |
dayInWeek | int | dayInWeek | int | |
hour | int | hour | int | Time in day, 1day = 24 hours |
minute | int | minute | int | |
second | int | second | int | |
milliSecond | int | milliSecond | int |
Method | Description |
---|---|
int getField(int field) | Field representations can be retrieved from DateUtil |
void setField(int field, int value) | |
String toString() | Formats the date with yyyy-MM-dd HH:mm:ss |
String format(String formatString) | For how to format the date, see this |
You can compare two IDate
instances with <, >, <=, >=, == and !=.