Examples of DateObject


Examples of ch.sahits.game.openpatrician.model.time.DateObject

      y = drawRow(g2d, y, firstColumn, sb.toString());
     
      y += positions.lineHeight;
     
      // Birth
      DateObject now = new DateObject(Date.getInstance(0).getCurrentDate()); // TODO ugly
      y = drawRow(g2d, y, firstColumn, "Born");
      sb = new StringBuilder();
      ICity birthPlace = data.getBirthPlace();
      sb.append("on ").append(data.getBirthDate().toDisplayString()).append(" in ").append(birthPlace.getName()).append(", ");
      sb.append("Age ").append(data.getAge(now));
View Full Code Here

Examples of ch.sahits.game.openpatrician.model.time.DateObject

    }
    Calendar cal = Calendar.getInstance();
    cal.set(Calendar.YEAR, year);
    cal.set(Calendar.MONTH, month);
    cal.set(Calendar.DAY_OF_MONTH, day);
    return new DateObject(cal);
  }
View Full Code Here

Examples of ch.sahits.game.openpatrician.model.time.DateObject

  public Contributions() {
    contributions = new DailyContribution[]{new DailyContribution(),new DailyContribution(),new DailyContribution(),
                                        new DailyContribution(),new DailyContribution(),new DailyContribution(),
                                        new DailyContribution()};
    date = Date.getInstance(0); // TODO ugly
    lastDate = new DateObject(date.getCurrentDate());
  }
View Full Code Here

Examples of ch.sahits.game.openpatrician.model.time.DateObject

   * @param ware
   * @param amount
   */
  public void contribute(IWare ware,int amount){
    int index = date.getWeekdayIndex();
    DateObject now = new DateObject(date.getCurrentDate());
    if (!lastDate.isSameDate(now)){
      contributions[index]=new DailyContribution(); // contribution happens on another day
      lastDate=now;
    }
    contributions[index].contribute(ware, amount);
View Full Code Here

Examples of org.conserve.objects.DateObject

   */
  @Test
  public void testSqlDate() throws Exception
  {
    PersistenceManager persist = new PersistenceManager(driver, database, login, password);
    DateObject dateO = new DateObject();
    dateO.setDate(new java.sql.Date(System.currentTimeMillis()));
    dateO.setTime(new java.sql.Time(System.currentTimeMillis()));
    dateO.setTimeStamp(new java.sql.Timestamp(System.currentTimeMillis()));
    persist.saveObject(dateO);

    // make sure only one object exists
    List<Object> all = persist.getObjectsMatching(new Object());
    assertEquals(1, all.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.