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

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

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

YearMonthDay.getMonthOfYear介绍

[英]Get the month of year field value.
[中]获取“月份”字段值。

代码示例

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

  1. /**
  2. * Converts this object to a LocalDate with the same date and chronology.
  3. *
  4. * @return a LocalDate with the same date and chronology
  5. * @since 1.3
  6. */
  7. public LocalDate toLocalDate() {
  8. return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
  9. }

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

  1. /**
  2. * Converts this object to a LocalDate with the same date and chronology.
  3. *
  4. * @return a LocalDate with the same date and chronology
  5. * @since 1.3
  6. */
  7. public LocalDate toLocalDate() {
  8. return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
  9. }

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

  1. /**
  2. * Converts this YearMonthDay to a full datetime at midnight using the
  3. * specified time zone.
  4. * <p>
  5. * This method uses the chronology from this instance plus the time zone
  6. * specified.
  7. *
  8. * @param zone the zone to use, null means default
  9. * @return this date as a datetime at midnight
  10. */
  11. public DateTime toDateTimeAtMidnight(DateTimeZone zone) {
  12. Chronology chrono = getChronology().withZone(zone);
  13. return new DateTime(getYear(), getMonthOfYear(), getDayOfMonth(), 0, 0, 0, 0, chrono);
  14. }

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

  1. /**
  2. * Converts this YearMonthDay to a full datetime at midnight using the
  3. * specified time zone.
  4. * <p>
  5. * This method uses the chronology from this instance plus the time zone
  6. * specified.
  7. *
  8. * @param zone the zone to use, null means default
  9. * @return this date as a datetime at midnight
  10. */
  11. public DateTime toDateTimeAtMidnight(DateTimeZone zone) {
  12. Chronology chrono = getChronology().withZone(zone);
  13. return new DateTime(getYear(), getMonthOfYear(), getDayOfMonth(), 0, 0, 0, 0, chrono);
  14. }

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

  1. /**
  2. * Converts this object to a DateMidnight.
  3. *
  4. * @param zone the zone to get the DateMidnight in, null means default
  5. * @return the DateMidnight instance
  6. */
  7. public DateMidnight toDateMidnight(DateTimeZone zone) {
  8. Chronology chrono = getChronology().withZone(zone);
  9. return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
  10. }

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

  1. /**
  2. * Converts this object to a DateMidnight.
  3. *
  4. * @param zone the zone to get the DateMidnight in, null means default
  5. * @return the DateMidnight instance
  6. */
  7. public DateMidnight toDateMidnight(DateTimeZone zone) {
  8. Chronology chrono = getChronology().withZone(zone);
  9. return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
  10. }

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

  1. /**
  2. * Converts this object to a LocalDate with the same date and chronology.
  3. *
  4. * @return a LocalDate with the same date and chronology
  5. * @since 1.3
  6. */
  7. public LocalDate toLocalDate() {
  8. return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
  9. }

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

  1. /**
  2. * Converts this YearMonthDay to a full datetime at midnight using the
  3. * specified time zone.
  4. * <p>
  5. * This method uses the chronology from this instance plus the time zone
  6. * specified.
  7. *
  8. * @param zone the zone to use, null means default
  9. * @return this date as a datetime at midnight
  10. */
  11. public DateTime toDateTimeAtMidnight(DateTimeZone zone) {
  12. Chronology chrono = getChronology().withZone(zone);
  13. return new DateTime(getYear(), getMonthOfYear(), getDayOfMonth(), 0, 0, 0, 0, chrono);
  14. }

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

  1. /**
  2. * Converts this object to a DateMidnight.
  3. *
  4. * @param zone the zone to get the DateMidnight in, null means default
  5. * @return the DateMidnight instance
  6. */
  7. public DateMidnight toDateMidnight(DateTimeZone zone) {
  8. Chronology chrono = getChronology().withZone(zone);
  9. return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
  10. }

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

  1. @Deprecated
  2. public java.util.Date getModification() {
  3. org.joda.time.YearMonthDay ymd = getModificationYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. @Deprecated
  2. public java.util.Date getEnrollmentBeginDayDate() {
  3. org.joda.time.YearMonthDay ymd = getEnrollmentBeginDayDateYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. @Deprecated
  2. public java.util.Date getSubmitDate() {
  3. org.joda.time.YearMonthDay ymd = getSubmitDateYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. @Deprecated
  2. public java.util.Date getEndPayment() {
  3. org.joda.time.YearMonthDay ymd = getEndPaymentYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. @Deprecated
  2. public java.util.Date getBegin() {
  3. org.joda.time.YearMonthDay ymd = getBeginYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. @Deprecated
  2. public java.util.Date getCreation() {
  3. org.joda.time.YearMonthDay ymd = getCreationYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. @Deprecated
  2. public java.util.Date getStartPayment() {
  3. org.joda.time.YearMonthDay ymd = getStartPaymentYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. @Deprecated
  2. public java.util.Date getDateOfBirth() {
  3. org.joda.time.YearMonthDay ymd = getDateOfBirthYearMonthDay();
  4. return (ymd == null) ? null : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
  5. }

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

  1. /**
  2. * Converts this object to a LocalDate with the same date and chronology.
  3. *
  4. * @return a LocalDate with the same date and chronology
  5. * @since 1.3
  6. */
  7. public LocalDate toLocalDate() {
  8. return new LocalDate(getYear(), getMonthOfYear(), getDayOfMonth(), getChronology());
  9. }

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  1. /**
  2. * Converts this object to a DateMidnight.
  3. *
  4. * @param zone the zone to get the DateMidnight in, null means default
  5. * @return the DateMidnight instance
  6. */
  7. public DateMidnight toDateMidnight(DateTimeZone zone) {
  8. Chronology chrono = getChronology().withZone(zone);
  9. return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
  10. }

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

  1. /**
  2. * Converts this object to a DateMidnight.
  3. *
  4. * @param zone the zone to get the DateMidnight in, null means default
  5. * @return the DateMidnight instance
  6. */
  7. public DateMidnight toDateMidnight(DateTimeZone zone) {
  8. Chronology chrono = getChronology().withZone(zone);
  9. return new DateMidnight(getYear(), getMonthOfYear(), getDayOfMonth(), chrono);
  10. }

相关文章