Definition at line 22 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.DateTruncUnit |
( |
String |
token, |
|
|
Function< LocalDateTime, LocalDateTime > |
trunc |
|
) |
| |
|
inlineprivate |
Definition at line 196 of file DateTimeTest.java.
197 this.sqlToken = token;
Function< LocalDateTime, LocalDateTime > trunc
com.mapd.tests.DateTimeTest.DateTruncUnit.dtCENTURY |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
int year = t.getYear();
int range = 100;
int diff = year % range;
if (diff == 0) {
diff = range;
}
year -= diff;
t = t.withYear(year + 1);
t = t.withMonth(1);
t = t.withDayOfMonth(1);
t = t.truncatedTo(ChronoUnit.DAYS);
return t;
}
})
Definition at line 118 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtDAY |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.truncatedTo(ChronoUnit.DAYS);
return t;
}
})
Definition at line 73 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtDECADE |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
int year = t.getYear();
int range = 10;
int diff = year % range;
year -= diff;
t = t.withYear(year);
t = t.withMonth(1);
t = t.withDayOfMonth(1);
t = t.truncatedTo(ChronoUnit.DAYS);
return t;
}
})
Definition at line 136 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtHOUR |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.truncatedTo(ChronoUnit.HOURS);
return t;
}
})
Definition at line 80 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtMICROSECOND |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.truncatedTo(ChronoUnit.MICROS);
return t;
}
})
Definition at line 157 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtMILLISECOND |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.truncatedTo(ChronoUnit.MILLIS);
return t;
}
})
Definition at line 150 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtMINUTE |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.truncatedTo(ChronoUnit.MINUTES);
return t;
}
})
Definition at line 87 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtMONTH |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.withDayOfMonth(1);
t = t.truncatedTo(ChronoUnit.DAYS);
return t;
}
})
Definition at line 65 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtNANOSECOND |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.truncatedTo(ChronoUnit.NANOS);
return t;
}
})
Definition at line 164 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtQUARTER |
com.mapd.tests.DateTimeTest.DateTruncUnit.dtSECOND |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.truncatedTo(ChronoUnit.SECONDS);
return t;
}
})
Definition at line 94 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtWEEK |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.with(ChronoField.DAY_OF_WEEK, 1);
t = t.truncatedTo(ChronoUnit.DAYS);
return t;
}
})
Definition at line 171 of file DateTimeTest.java.
com.mapd.tests.DateTimeTest.DateTruncUnit.dtYEAR |
Initial value:
@Override
public LocalDateTime apply(LocalDateTime t) {
t = t.withMonth(1);
t = t.withDayOfMonth(1);
t = t.truncatedTo(ChronoUnit.DAYS);
return t;
}
})
Definition at line 23 of file DateTimeTest.java.
String com.mapd.tests.DateTimeTest.DateTruncUnit.sqlToken |
|
private |
Function<LocalDateTime, LocalDateTime> com.mapd.tests.DateTimeTest.DateTruncUnit.trunc |
The documentation for this enum was generated from the following file:
- /home/jenkins-slave/workspace/core-os-doxygen/java/utility/src/main/java/com/mapd/tests/DateTimeTest.java