コード例 #1
1
ファイル: CIManagerImpl.java プロジェクト: manoj-s/framework
 private String getDate(String timeStampStr, String format) {
   DateFormat formatter = new SimpleDateFormat(format);
   long timeStamp = Long.parseLong(timeStampStr);
   Calendar calendar = Calendar.getInstance();
   calendar.setTimeInMillis(timeStamp);
   return formatter.format(calendar.getTime());
 }
コード例 #2
0
  public boolean renewRole(SorRole role) {
    final Calendar cal = Calendar.getInstance();

    // TODO need to read configuration data for setting the default renewal date for this role type.
    // hard code to 6 months for now.
    cal.add(Calendar.MONTH, 6);
    role.setEnd(cal.getTime());
    return true;
  }