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

x33g5p2x  于2022-02-05 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(121)

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

YearMonthDay.toDateTimeAtMidnight介绍

[英]Converts this YearMonthDay to a full datetime at midnight using the default time zone.
[中]使用默认时区将此YearMonthDay转换为午夜的完整日期时间。

代码示例

代码示例来源:origin: joda-time/joda-time

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: JodaOrg/joda-time

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: org.joda/com.springsource.org.joda.time

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: redfish64/TinyTravelTracker

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

代码示例来源:origin: Nextdoor/bender

/**
 * Converts this YearMonthDay to a full datetime at midnight using the
 * default time zone.
 *
 * @return this date as a datetime at midnight
 */
public DateTime toDateTimeAtMidnight() {
  return toDateTimeAtMidnight(null);
}

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

private List<GanttDiagramEvent> generateEntriesTree(HttpServletRequest request, AcademicCalendarRootEntry academicCalendar,
    YearMonthDay begin, YearMonthDay end) {
  DateTime beginDateTime = begin.toDateTimeAtMidnight();
  DateTime endDateTime = end.toDateTimeAtMidnight();
  List<GanttDiagramEvent> result = new ArrayList<GanttDiagramEvent>();
  for (AcademicCalendarEntry entry : academicCalendar.getChildEntriesWithTemplateEntriesOrderByDate(beginDateTime,
      endDateTime)) {
    getSubEntriesTree(entry, result, beginDateTime, endDateTime);
  }
  return result;
}

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

private void calculateFirstAndLastInstantInMonthlyMode(YearMonthDay begin) {
  if (begin == null) {
    throw new IllegalArgumentException();
  }
  DateTime beginDateTime = begin.toDateTimeAtMidnight();
  beginDateTime = (beginDateTime.getDayOfMonth() != 1) ? beginDateTime.withDayOfMonth(1) : beginDateTime;
  setFirstInstant(beginDateTime);
  setLastInstant(beginDateTime.plusMonths(1).minusDays(1));
}

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

public ExecutionSemester getStartExecutionPeriod() {
  ExecutionSemester result = null;
  final YearMonthDay startDate = getStartDateYearMonthDay();
  if (startDate != null) {
    result = ExecutionSemester.readByDateTime(startDate.toDateTimeAtMidnight());
    if (result == null) {
      result = ExecutionYear.readByDateTime(startDate.toDateTimeAtMidnight()).getFirstExecutionPeriod();
    }
  }
  return result != null ? result : getFirstExecutionPeriod();
}

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

private static DateTime calculateStartDate(final ExecutionYear executionYear) {
  DateTime now = new DateTime();
  return executionYear == null || (executionYear.isCurrent() && executionYear.getAcademicInterval().contains(now)) ? now : executionYear
      .getBeginDateYearMonthDay().toDateTimeAtMidnight();
}

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

public SortedSet<Integer> getWeeks() {
  final ExecutionCourse executionCourse = shift.getExecutionCourse();
  final YearMonthDay firstPossibleLessonDay = executionCourse.getMaxLessonsPeriod().getLeft();
  final YearMonthDay lastPossibleLessonDay = executionCourse.getMaxLessonsPeriod().getRight();
  return getWeeks(new Interval(firstPossibleLessonDay.toDateTimeAtMidnight(), lastPossibleLessonDay.toDateTimeAtMidnight()
      .plusDays(1)));
}

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

private String getInsuranceFee(final PhdIndividualProgramProcess individualProgramProcess) {
  return ((FixedAmountPR) Bennu
      .getInstance()
      .getInstitutionUnit()
      .getUnitServiceAgreementTemplate()
      .findPostingRuleBy(EventType.INSURANCE,
          individualProgramProcess.getExecutionYear().getBeginDateYearMonthDay().toDateTimeAtMidnight(),
          individualProgramProcess.getExecutionYear().getEndDateYearMonthDay().toDateTimeAtMidnight()))
      .getFixedAmount().toPlainString();
}

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

@Atomic
  public static void run(User user, ResidenceEvent event, YearMonthDay date) {
    event.process(user, event.calculateEntries(), new AccountingTransactionDetailDTO(date.toDateTimeAtMidnight(),
        PaymentMethod.getCashPaymentMethod(),"", null));
  }
}

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

public void setStateDate(final YearMonthDay ymd) {
  if (ymd == null) {
    setStateDateTime(null);
    return;
  }
  setStateDateTime(new YearMonthDay().equals(ymd) ? ymd.toDateTimeAtCurrentTime() : ymd.toDateTimeAtMidnight());
}

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

public String getPersonalDataAuthorization() {
  StudentDataShareAuthorization dataAccess =
      getStudent().getPersonalDataAuthorizationAt(getExecutionYear().getEndDateYearMonthDay().toDateTimeAtMidnight());
  return dataAccess != null ? dataAccess.getAuthorizationChoice().getDescription() : StringUtils.EMPTY;
}

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

public ViewEventSpaceOccupationsBean(YearMonthDay day, Space allocatableSpace) {
  setAllocatableSpace(allocatableSpace);
  if (day != null) {
    setYear(new Partial(DateTimeFieldType.year(), day.getYear()));
    setMonth(new Partial(DateTimeFieldType.monthOfYear(), day.getMonthOfYear()));
    YearMonthDay monday = day.toDateTimeAtMidnight().withDayOfWeek(MONDAY_IN_JODA_TIME).toYearMonthDay();
    if ((monday.getMonthOfYear() < day.getMonthOfYear()) || (monday.getYear() < day.getYear())) {
      monday = monday.plusDays(Lesson.NUMBER_OF_DAYS_IN_WEEK);
    }
    setDay(monday);
  }
}

相关文章