Search in sources :

Example 46 with Calendar

use of java.util.Calendar in project head by mifos.

the class VoucherBranchMappingActionForm method setLastProcessDate.

public void setLastProcessDate(java.util.Date date) {
    Calendar c = Calendar.getInstance();
    c.setTime(date);
    // note that Calendar retrieves 0-based month, so increment month field
    int day = c.get(Calendar.DAY_OF_MONTH);
    int month = c.get(Calendar.MONTH) + 1;
    int year = c.get(Calendar.YEAR);
    setLastProcessDateDD(Integer.toString(day));
    setLastProcessDateMM(Integer.toString(month));
    setLastProcessDateYY(Integer.toString(year));
}
Also used : Calendar(java.util.Calendar)

Example 47 with Calendar

use of java.util.Calendar in project head by mifos.

the class ConsolidatedTransactionActionForm method setLastProcessDate.

public void setLastProcessDate(java.util.Date date) {
    Calendar c = Calendar.getInstance();
    c.setTime(date);
    // note that Calendar retrieves 0-based month, so increment month field
    int day = c.get(Calendar.DAY_OF_MONTH);
    int month = c.get(Calendar.MONTH) + 1;
    int year = c.get(Calendar.YEAR);
    setLastProcessDateDD(Integer.toString(day));
    setLastProcessDateMM(Integer.toString(month));
    setLastProcessDateYY(Integer.toString(year));
}
Also used : Calendar(java.util.Calendar)

Example 48 with Calendar

use of java.util.Calendar in project head by mifos.

the class ConsolidatedTransactionActionForm method setChequeDate.

public void setChequeDate(java.util.Date date) {
    Calendar c = Calendar.getInstance();
    c.setTime(date);
    // note that Calendar retrieves 0-based month, so increment month field
    int day = c.get(Calendar.DAY_OF_MONTH);
    int month = c.get(Calendar.MONTH) + 1;
    int year = c.get(Calendar.YEAR);
    setChequeDateDD(Integer.toString(day));
    setChequeDateMM(Integer.toString(month));
    setChequeDateYY(Integer.toString(year));
}
Also used : Calendar(java.util.Calendar)

Example 49 with Calendar

use of java.util.Calendar in project head by mifos.

the class InterOfficeTransferActionForm method setChequeDate.

public void setChequeDate(java.util.Date date) {
    Calendar c = Calendar.getInstance();
    c.setTime(date);
    // note that Calendar retrieves 0-based month, so increment month field
    int day = c.get(Calendar.DAY_OF_MONTH);
    int month = c.get(Calendar.MONTH) + 1;
    int year = c.get(Calendar.YEAR);
    setChequeDateDD(Integer.toString(day));
    setChequeDateMM(Integer.toString(month));
    setChequeDateYY(Integer.toString(year));
}
Also used : Calendar(java.util.Calendar)

Example 50 with Calendar

use of java.util.Calendar in project head by mifos.

the class ProcessAccountingTransactionsActionForm method setLastProcessDate.

public void setLastProcessDate(java.util.Date date) {
    Calendar c = Calendar.getInstance();
    c.setTime(date);
    // note that Calendar retrieves 0-based month, so increment month field
    int day = c.get(Calendar.DAY_OF_MONTH);
    int month = c.get(Calendar.MONTH) + 1;
    int year = c.get(Calendar.YEAR);
    setLastProcessDateDD(Integer.toString(day));
    setLastProcessDateMM(Integer.toString(month));
    setLastProcessDateYY(Integer.toString(year));
}
Also used : Calendar(java.util.Calendar)

Aggregations

Calendar (java.util.Calendar)9446 Date (java.util.Date)2436 GregorianCalendar (java.util.GregorianCalendar)2130 Test (org.junit.Test)1735 SimpleDateFormat (java.text.SimpleDateFormat)889 ArrayList (java.util.ArrayList)476 ParseException (java.text.ParseException)353 HashMap (java.util.HashMap)270 TimeZone (java.util.TimeZone)270 IOException (java.io.IOException)235 DateFormat (java.text.DateFormat)224 Timestamp (java.sql.Timestamp)194 List (java.util.List)187 File (java.io.File)167 Map (java.util.Map)149 BigDecimal (java.math.BigDecimal)134 Locale (java.util.Locale)134 Test (org.testng.annotations.Test)118 Identity (org.olat.core.id.Identity)112 Date (java.sql.Date)110