gpt4 book ai didi

org.joda.time.YearMonthDay.toLocalDate()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 08:26:40 25 4
gpt4 key购买 nike

本文整理了Java中org.joda.time.YearMonthDay.toLocalDate()方法的一些代码示例,展示了YearMonthDay.toLocalDate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearMonthDay.toLocalDate()方法的具体详情如下:
包路径:org.joda.time.YearMonthDay
类名称:YearMonthDay
方法名:toLocalDate

YearMonthDay.toLocalDate介绍

[英]Converts this object to a LocalDate with the same date and chronology.
[中]

代码示例

代码示例来源:origin: org.jadira.usertype/usertype.core

@Override
  public Date toNonNullValue(YearMonthDay value) {

    return Date.valueOf(LOCAL_DATE_FORMATTER.print((LocalDate)(value.toLocalDate())));
  }
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
  protected Optional<LocalDate> getPenaltyDueDate(Event event) {
    return Optional.of(getWhenToApplyFixedAmountPenalty().toLocalDate());
  }
}

代码示例来源:origin: FenixEdu/fenixedu-academic

public LocalDate getBeginLocalDate() {
  final YearMonthDay result = getBeginDateYearMonthDay();
  return result == null ? null : result.toLocalDate();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

public LocalDate getEndLocalDate() {
  final YearMonthDay result = getEndDateYearMonthDay();
  return result == null ? null : result.toLocalDate();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
protected Optional<LocalDate> getPenaltyDueDate(Event event) {
  final IAdministrativeOfficeFeeEvent administrativeOfficeFeeEvent = (IAdministrativeOfficeFeeEvent) event;
  final YearMonthDay paymentEndDate =
    administrativeOfficeFeeEvent.getPaymentEndDate() != null ? administrativeOfficeFeeEvent
                                          .getPaymentEndDate() : getWhenToApplyFixedAmountPenalty();
  return Optional.of(paymentEndDate.toLocalDate());
}

代码示例来源:origin: FenixEdu/fenixedu-academic

private SortedSet<YearMonthDay> getAllLessonInstancesDatesToCreate(YearMonthDay startDate, YearMonthDay endDate,
    Boolean createLessonInstances) {
  if (startDate != null && endDate != null && !startDate.isAfter(endDate) && createLessonInstances) {
    SortedSet<YearMonthDay> possibleLessonDates = getAllValidLessonDatesWithoutInstancesDates(startDate, endDate);
    List<LessonInstance> allLessonInstancesUntil = getAllLessonInstancesUntil(endDate.toLocalDate());
    for (LessonInstance lessonInstance : allLessonInstancesUntil) {
      possibleLessonDates.remove(lessonInstance.getDay());
    }
    return possibleLessonDates;
  }
  return new TreeSet<YearMonthDay>();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

protected void init(EventExemptionJustificationType justificationType, Event event, Person responsible, String reason,
    YearMonthDay dispatchDate) {
  checkParameters(justificationType);
  super.init(responsible, event, createJustification(justificationType, dispatchDate == null ? null : dispatchDate.toLocalDate(), reason));
  event.recalculateState(new DateTime());
}

代码示例来源:origin: FenixEdu/fenixedu-academic

public void refreshPaymentCodes(LocalDate start) {
  final List<EventPaymentCode> paymentCodesToRefresh =
      getPaymentCodeStream()
          .filter(paymentCodeHasOpenEvent.or(paymentCodeIsUsed.negate()))
          .filter(p -> !p.getStartDate().toLocalDate().equals(start))
          .collect(Collectors.toList());
  
  Lists.partition(paymentCodesToRefresh, CHUNK_SIZE).forEach(codes -> {
    FenixFramework.atomic(() -> {
      codes.forEach(code -> code.edit(start, start.plusMonths(getNumberOfMonths())));
    });
  });
}

代码示例来源:origin: FenixEdu/fenixedu-academic

public StudentCurricularPlanBean(final StudentCurricularPlan studentCurricularPlan) {
  this.studentCurricularPlan = studentCurricularPlan;
  this.registration = studentCurricularPlan.getRegistration();
  this.degreeCurricularPlan = studentCurricularPlan.getDegreeCurricularPlan();
  this.startDate = studentCurricularPlan.getStartDateYearMonthDay().toLocalDate();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
public Map<LocalDate, Money> calculateDueDateAmountMap() {
  final PostingRule postingRule = getPostingRule();
  if (postingRule instanceof AdministrativeOfficeFeePR) {
    LocalDate key = ((AdministrativeOfficeFeePR) postingRule).getWhenToApplyFixedAmountPenalty().toLocalDate();
    Money fixedAmount = ((AdministrativeOfficeFeePR) postingRule).getFixedAmount();
    return Collections.singletonMap(key, fixedAmount);
  }
  return super.calculateDueDateAmountMap();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
public String getCurrentExecutionYearBeginDate() {
  if (registration.isInMobilityState()) {
    return readCurrentExecutionYear().getBeginDateYearMonthDay().toLocalDate().toString("dd-MM-yyyy");
  }
  StudentCurricularPlan lastStudentCurricularPlan = registration.getLastStudentCurricularPlan();
  TreeSet<Enrolment> orderedEnrolmentSet =
      new TreeSet<Enrolment>(Collections.reverseOrder(CurriculumModule.COMPARATOR_BY_CREATION_DATE));
  orderedEnrolmentSet.addAll(lastStudentCurricularPlan.getEnrolmentsByExecutionYear(readCurrentExecutionYear()));
  return orderedEnrolmentSet.isEmpty() ? "" : orderedEnrolmentSet.iterator().next().getCreationDateDateTime().toLocalDate()
      .toString("dd-MM-yyyy");
}

代码示例来源:origin: FenixEdu/fenixedu-academic

public LocalDate getFirstEnrolmentOnCurrentExecutionYear() {
  if (getRegistration() == null) {
    return null;
  }
  if (getRegistration().isInMobilityState()) {
    return getForExecutionYear().getBeginDateYearMonthDay().toLocalDate();
  }
  TreeSet<Enrolment> orderedEnrolmentSet =
      new TreeSet<Enrolment>(Collections.reverseOrder(CurriculumModule.COMPARATOR_BY_CREATION_DATE));
  orderedEnrolmentSet.addAll(getStudentCurricularPlan().getEnrolmentsByExecutionYear(getForExecutionYear()));
  return orderedEnrolmentSet.isEmpty() ? null : orderedEnrolmentSet.iterator().next().getCreationDateDateTime()
      .toLocalDate();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
public Object provide(Object source, Object currentValue) {
  final StudentCurricularPlan studentCurricularPlan = ((IStudentCurricularPlanBean) source).getStudentCurricularPlan();
  final List<ExecutionSemester> executionPeriodsInTimePeriod =
      ExecutionSemester.readExecutionPeriodsInTimePeriod(
          studentCurricularPlan.getStartDateYearMonthDay().toLocalDate(), getEndDate());
  Collections.sort(executionPeriodsInTimePeriod, new ReverseComparator(ExecutionSemester.COMPARATOR_BY_SEMESTER_AND_YEAR));
  return executionPeriodsInTimePeriod;
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
public LocalDate getConclusionDate() {
  final RegistrationConclusionBean registrationConclusionBean =
      new RegistrationConclusionBean(getRegistration(), getProgramConclusion());
  return registrationConclusionBean.getConclusionDate().toLocalDate();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

private LocalDate getEndDate() {
  ExecutionYear currentExecutionYear = ExecutionYear.readCurrentExecutionYear();
  if (currentExecutionYear.hasNextExecutionYear() && currentExecutionYear.getNextExecutionYear().isOpen()) {
    return currentExecutionYear.getNextExecutionYear().getLastExecutionPeriod().getEndDateYearMonthDay().toLocalDate();
  }
  return currentExecutionYear.getLastExecutionPeriod().getEndDateYearMonthDay().toLocalDate();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

public void editConclusionInformation(final Person editor, final Grade finalGrade, final Grade rawGrade,
    final Grade descriptiveGrade, final YearMonthDay conclusion, final String notes) {
  if (!isConclusionProcessed()) {
    throw new DomainException(
        "error.org.fenixedu.academic.domain.studentCurriculum.CycleCurriculumGroup.its.only.possible.to.edit.after.conclusion.process.has.been.performed");
  }
  if (finalGrade == null || rawGrade == null || conclusion == null) {
    throw new DomainException("error.CycleCurriculumGroup.argument.must.not.be.null");
  }
  getConclusionProcess().update(editor, finalGrade, rawGrade, descriptiveGrade, conclusion.toLocalDate(), notes);
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
protected void initEventStartDate() {
  if (getStudentCurricularPlan() != null) {
    setEventStartDate(getStudentCurricularPlan().getRegistration().getStartDate().toLocalDate());
  }
}

代码示例来源:origin: FenixEdu/fenixedu-academic

public LocalDate getEnrolmentDateTime() {
  if (getRegistration().isFirstTime()) {
    return getRegistration().getStartDate().toLocalDate();
  }
  return getFirstEnrolmentOnCurrentExecutionYear();
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
public void setStartDate(YearMonthDay startDate) {
  String[] args = {};
  if (startDate == null) {
    throw new DomainException("error.Registration.null.startDate", args);
  }
  super.setStartDate(startDate);
  final ExecutionYear year = ExecutionYear.readByDateTime(startDate.toLocalDate());
  String[] args1 = {};
  if (year == null) {
    throw new DomainException("error.Registration.invalid.execution.year", args1);
  }
  setRegistrationYear(year);
}

代码示例来源:origin: FenixEdu/fenixedu-academic

@Override
public String getAmountToPay() {
  return installment.calculateAmount(event, installment.getStartDate().toLocalDate().toDateTimeAtStartOfDay(),
      BigDecimal.ZERO, event.getGratuityPaymentPlan().isToApplyPenalty(event, this.installment)).toPlainString();
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com