Example usage for org.joda.time YearMonthDay getDayOfMonth

List of usage examples for org.joda.time YearMonthDay getDayOfMonth

Introduction

In this page you can find the example usage for org.joda.time YearMonthDay getDayOfMonth.

Prototype

public int getDayOfMonth() 

Source Link

Document

Get the day of month field value.

Usage

From source file:com.moss.joda.time.xml.YearMonthDayAdapter.java

License:Open Source License

@Override
public String marshal(YearMonthDay object) throws Exception {
    if (object == null)
        return null;
    return object.getYear() + "-" + object.getMonthOfYear() + "-" + object.getDayOfMonth();
}

From source file:com.moss.jodapersist.YearMonthDayUserType.java

License:Open Source License

public long yearMonthDayToLong(YearMonthDay ymd) throws HibernateException {
    long l = 0;//from   ww w .  jav  a2  s  .  c o m

    l += ymd.getYear() * 10000;
    l += ymd.getMonthOfYear() * 100;
    l += ymd.getDayOfMonth();

    return l;
}

From source file:net.sourceforge.fenixedu.applicationTier.Servico.accounting.PostingRulesManager.java

License:Open Source License

@Atomic
public static void createDEAStandaloneGratuityPostingRule(StandaloneInstallmentBean bean,
        DegreeCurricularPlan degreeCurricularPlan) {
    check(AcademicPredicates.MANAGE_PAYMENTS);

    DegreeCurricularPlanServiceAgreementTemplate dcpSAT = degreeCurricularPlan.getServiceAgreementTemplate();
    if (dcpSAT != null) {
        YearMonthDay startDate = bean.getStartDate();

        LocalDate startLocalDate = new LocalDate(startDate.getYear(), startDate.getMonthOfYear(),
                startDate.getDayOfMonth());
        BigDecimal ectsForYear = bean.getEctsForYear();
        BigDecimal gratuityFactor = bean.getGratuityFactor();
        BigDecimal ectsFactor = bean.getEctsFactor();

        new StandaloneEnrolmentGratuityPR(startLocalDate.toDateTimeAtStartOfDay(), null, dcpSAT, ectsForYear,
                gratuityFactor, ectsFactor);
    } else {//from   w  ww. j a v a 2s .c o m
        throw new DomainException(
                "StandaloneEnrolmentGratuityPR.DegreeCurricularPlanServiceAgreementTemplate.cannot.be.null");
    }
}

From source file:net.sourceforge.fenixedu.dataTransferObject.InfoLessonInstanceAggregation.java

License:Open Source License

private void register(final YearMonthDay yearMonthDay) {
    dates.add(/* w ww .ja  v  a  2  s  .co  m*/
            new LocalDate(yearMonthDay.getYear(), yearMonthDay.getMonthOfYear(), yearMonthDay.getDayOfMonth()));
}

From source file:net.sourceforge.fenixedu.domain.AlumniIdentityCheckRequest.java

License:Open Source License

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

From source file:net.sourceforge.fenixedu.domain.candidacyProcess.IndividualCandidacyExternalPersonDetails.java

License:Open Source License

@Deprecated
public java.util.Date getEmissionDateOfDocumentId() {
    org.joda.time.YearMonthDay ymd = getEmissionDateOfDocumentIdYearMonthDay();
    return (ymd == null) ? null
            : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}

From source file:net.sourceforge.fenixedu.domain.candidacyProcess.IndividualCandidacyExternalPersonDetails.java

License:Open Source License

@Deprecated
public java.util.Date getExpirationDateOfDocumentId() {
    org.joda.time.YearMonthDay ymd = getExpirationDateOfDocumentIdYearMonthDay();
    return (ymd == null) ? null
            : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}

From source file:net.sourceforge.fenixedu.domain.CandidateSituation.java

License:Open Source License

@Deprecated
public java.util.Date getDate() {
    org.joda.time.YearMonthDay ymd = getDateYearMonthDay();
    return (ymd == null) ? null
            : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}

From source file:net.sourceforge.fenixedu.domain.CompetenceCourse.java

License:Open Source License

@Deprecated
public java.util.Date getCreationDate() {
    org.joda.time.YearMonthDay ymd = getCreationDateYearMonthDay();
    return (ymd == null) ? null
            : new java.util.Date(ymd.getYear() - 1900, ymd.getMonthOfYear() - 1, ymd.getDayOfMonth());
}

From source file:net.sourceforge.fenixedu.domain.CurricularCourseScope.java

License:Open Source License

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