Package com.appspot.finajjarane.framework.models

Examples of com.appspot.finajjarane.framework.models.DateDetailsModel


    if(null==lang){
      lang = Utils.getLanguage();
    }

    DateDetailsModel dateModel = new DateDetailsModel();
    Calendar calendar = Calendar.getInstance();

    dateModel.setDate(date);
    calendar.setTime(date);

    String dateFormat = Utils.getTranslatedMessage("date.format", lang);
    SimpleDateFormat simpleDateFormat = new SimpleDateFormat(dateFormat);


    if(null!=date){
      dateModel.setDayNumber(calendar.get(Calendar.DAY_OF_WEEK));
      dateModel.setMonthNumber(calendar.get(Calendar.MONTH));
      dateModel.setYearNumber(calendar.get(Calendar.YEAR));
      dateModel.setHour(calendar.get(Calendar.HOUR_OF_DAY));
      dateModel.setMinute(calendar.get(Calendar.MINUTE));
      dateModel.setSeconde(calendar.get(Calendar.SECOND));
      dateModel.setFormattedDate(simpleDateFormat.format(date));
    }


    return dateModel;
  }
View Full Code Here

TOP

Related Classes of com.appspot.finajjarane.framework.models.DateDetailsModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.