Examples of roll()


Examples of com.ibm.icu.util.Calendar.roll()

        tempCal.set(Calendar.DAY_OF_WEEK, tempCal.getFirstDayOfWeek());
        SimpleDateFormat dateFormat = new SimpleDateFormat("EEEE", locale);
        List<String> resultList = new ArrayList<String>();
        for (int i = 0; i < 7; i++) {
            resultList.add(dateFormat.format(tempCal.getTime()));
            tempCal.roll(Calendar.DAY_OF_WEEK, 1);
        }
        return resultList;
    }

    /**
 
View Full Code Here

Examples of com.ibm.icu.util.Calendar.roll()

        tempCal.set(Calendar.MONTH, Calendar.JANUARY);
        SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM", locale);
        List<String> resultList = new ArrayList<String>();
        for (int i = Calendar.JANUARY; i <= tempCal.getActualMaximum(Calendar.MONTH); i++) {
            resultList.add(dateFormat.format(tempCal.getTime()));
            tempCal.roll(Calendar.MONTH, 1);
        }
        return resultList;
    }

    /**
 
View Full Code Here

Examples of com.ibm.icu.util.Calendar.roll()

        tempCal.set(Calendar.DAY_OF_WEEK, tempCal.getFirstDayOfWeek());
        SimpleDateFormat dateFormat = new SimpleDateFormat("EEEE", locale);
        List<String> resultList = new ArrayList<String>();
        for (int i = 0; i < 7; i++) {
            resultList.add(dateFormat.format(tempCal.getTime()));
            tempCal.roll(Calendar.DAY_OF_WEEK, 1);
        }
        return resultList;
    }

    /**
 
View Full Code Here

Examples of com.ibm.icu.util.Calendar.roll()

        tempCal.set(Calendar.MONTH, Calendar.JANUARY);
        SimpleDateFormat dateFormat = new SimpleDateFormat("MMMM", locale);
        List<String> resultList = new ArrayList<String>();
        for (int i = Calendar.JANUARY; i <= tempCal.getActualMaximum(Calendar.MONTH); i++) {
            resultList.add(dateFormat.format(tempCal.getTime()));
            tempCal.roll(Calendar.MONTH, 1);
        }
        return resultList;
    }

    /**
 
View Full Code Here

Examples of com.ibm.icu.util.GregorianCalendar.roll()

            Date before = (Date)ADDROLL[i+2];
            Date after = (Date)ADDROLL[i+3];

            testCal.setTime(before);
            if (ADDROLL[i] == ADD) testCal.add(Calendar.WEEK_OF_YEAR, amount);
            else testCal.roll(Calendar.WEEK_OF_YEAR, amount);
            log((ADDROLL[i]==ADD?"add(WOY,":"roll(WOY,") +
                             amount + ") " + before + " => " +
                             testCal.getTime());
            if (!after.equals(testCal.getTime())) {
                logln("  exp:" + after + "  FAIL");
View Full Code Here

Examples of dojo.trivia.a20120505cr5.Game.roll()

      aGame.add("Pat");
      aGame.add("Sue");

      do {

         aGame.roll(rand.nextInt(5) + 1);

         if (rand.nextInt(9) == 7) {
            notAWinner = aGame.wrongAnswer();
         } else {
            notAWinner = aGame.wasCorrectlyAnswered();
View Full Code Here

Examples of dojo.trivia.a20120505cr6.Game.roll()

      aGame.add("Pat");
      aGame.add("Sue");

      do {

         aGame.roll(rand.nextInt(5) + 1);

         if (rand.nextInt(9) == 7) {
            notAWinner = aGame.wrongAnswer();
         } else {
            notAWinner = aGame.wasCorrectlyAnswered();
View Full Code Here

Examples of java.util.Calendar.roll()

    }

    protected void processDeletions() {
        Map<String, Object> parameters = new HashMap<String, Object>(1);
        Calendar cal = Calendar.getInstance();
        cal.roll(Calendar.MINUTE, TIMEOUT);
        parameters.put("creation", cal.getTime());
        List<TemporalFile> outdated = dao.findByNamedQuery(TemporalFile.FIND_TIMED_OUT, 0, 50, parameters);
        if (log.isInfoEnabled()) log.info("Found [" + outdated.size() + "] outdated temporal files to remove");
        for (TemporalFile tempFile : outdated) {
            String uri = tempFile.getUri();
View Full Code Here

Examples of java.util.Calendar.roll()

        if (request instanceof HttpServletRequest) {
            filterChain.doFilter(request, response);
            HttpServletResponse httpResponse = (HttpServletResponse) response;
            httpResponse.setHeader("Pragma", "public");
            Calendar cal = new GregorianCalendar();
            cal.roll(Calendar.SECOND, seconds);
            httpResponse.setHeader("Cache-Control", "PUBLIC, max-age=" + seconds + ", must-revalidate");
            httpResponse.setHeader("Expires", httpDateFormat.format(cal.getTime()));
        }
    }
View Full Code Here

Examples of java.util.Calendar.roll()

  @Override
  public IValue visitDateTime(Type type) {
    Calendar cal = Calendar.getInstance();
    int milliOffset = stRandom.nextInt(1000) * (stRandom.nextBoolean() ? -1 : 1);
    cal.roll(Calendar.MILLISECOND, milliOffset);
    int second = stRandom.nextInt(60) * (stRandom.nextBoolean() ? -1 : 1);
    cal.roll(Calendar.SECOND, second);
    int minute = stRandom.nextInt(60) * (stRandom.nextBoolean() ? -1 : 1);
    cal.roll(Calendar.MINUTE, minute);
    int hour = stRandom.nextInt(60) * (stRandom.nextBoolean() ? -1 : 1);
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.