MCPcopy Create free account
hub / github.com/SeanDragon/protools / toMinDate

Method toMinDate

common/src/main/java/pro/tools/time/DatePlus.java:419–443  ·  view source on GitHub ↗
(DateType dateType)

Source from the content-addressed store, hash-verified

417 }
418
419 public DatePlus toMinDate(DateType dateType) {
420 switch (dateType) {
421 case YEAR:
422 this.localDateTime = LocalDateTime.of(getYear(), 1, 1, 0, 0, 0, 0);
423 break;
424 case MONTH:
425 this.localDateTime = LocalDateTime.of(getYear(), getMonth(), 1, 0, 0, 0, 0);
426 break;
427 case DAY:
428 this.localDateTime = LocalDateTime.of(getYear(), getMonth(), getDayOfMonth(), 0, 0, 0, 0);
429 break;
430 case HOUR:
431 this.localDateTime = LocalDateTime.of(getYear(), getMonth(), getDayOfMonth(), getHour(), 0, 0, 0);
432 break;
433 case MINUTES:
434 this.localDateTime = LocalDateTime.of(getYear(), getMonth(), getDayOfMonth(), getHour(), getMinute(), 0, 0);
435 break;
436 case SECONDS:
437 this.localDateTime = LocalDateTime.of(getYear(), getMonth(), getDayOfMonth(), getHour(), getMinute(), getSecond(), 0);
438 break;
439 default:
440 break;
441 }
442 return this;
443 }
444
445 public DatePlus toMaxDate(DateType dateType) {
446 switch (dateType) {

Callers

nothing calls this directly

Calls 7

getYearMethod · 0.95
getMonthMethod · 0.95
getDayOfMonthMethod · 0.95
getHourMethod · 0.95
getMinuteMethod · 0.95
getSecondMethod · 0.95
ofMethod · 0.80

Tested by

no test coverage detected