Package java.util

Examples of java.util.Calendar.roll()


          label.setText("Fri");
        } else if (dayInt == Calendar.SATURDAY) {
          label.setText("Sat");
        }
        days.add(label);
        setupCalendar.roll(Calendar.DAY_OF_WEEK, true);
      }

      setupCalendar = (Calendar) calendar.clone();
      setupCalendar.set(Calendar.DAY_OF_MONTH, 1);
      int first = setupCalendar.get(Calendar.DAY_OF_WEEK);
View Full Code Here


  private void update(int addend, boolean shifted){
    Calendar c = parseDate(getText());
    int pos = getCaretPosition();
    int field = posToField(pos);
    if (shifted){
      c.roll(field,true);
    } else {
      c.add(field,addend);
    }
    String newDate =dateFormat.format(c.getTime());
    setText(newDate);
View Full Code Here

        return df;
    }

    private static long calculateExpiryDate() {
        Calendar cal = Calendar.getInstance();
        cal.roll(Calendar.MONTH, 1);
        return cal.getTime().getTime();
    }

    public static void fastChannelCopy(final InputStream in, final OutputStream out) throws IOException {
View Full Code Here

    @Test
    public void testRetentionCoords() throws FalconException {
        org.apache.falcon.entity.v0.feed.Cluster cluster = FeedHelper.getCluster(feed, srcCluster.getName());
        final Calendar instance = Calendar.getInstance();
        instance.roll(Calendar.YEAR, 1);
        cluster.getValidity().setEnd(instance.getTime());

        OozieFeedMapper feedMapper = new OozieFeedMapper(feed);
        List<COORDINATORAPP> coords = feedMapper.getCoordinators(srcCluster, new Path("/projects/falcon/"));
        COORDINATORAPP coord = coords.get(0);
View Full Code Here

    otherDate.add(Calendar.YEAR, 1);
    assertEquals(0, taskService.createTaskQuery().dueDate(otherDate.getTime()).count());

    Calendar priorDate = Calendar.getInstance();
    priorDate.setTime(dueDate);
    priorDate.roll(Calendar.YEAR, -1);
    assertEquals(1, taskService.createTaskQuery().dueAfter(priorDate.getTime())
        .count());

    assertEquals(1, taskService.createTaskQuery()
        .dueBefore(otherDate.getTime()).count());
View Full Code Here

        return df;
    }

    private static long calculateExpiryDate() {
        Calendar cal = Calendar.getInstance();
        cal.roll(Calendar.MONTH, 1);
        return cal.getTime().getTime();
    }

    public static void fastChannelCopy(final InputStream in, final OutputStream out) throws IOException {
View Full Code Here

  @Test
  public void shouldntDoNothingWhenFinalDateNotExpired() {

    Calendar calendar = Calendar.getInstance();
    calendar.roll(Calendar.DAY_OF_MONTH, 1); // rest one day for finish the sprint

    Sprint sprint = new Sprint();
    sprint.setFinalDate(calendar.getTime());
    sprint.setSprintStatus(SprintStatus.RUNNING);
View Full Code Here

     * all story in status different of done should changing status to backlog.
     *
     */

    Calendar calendar = Calendar.getInstance();
    calendar.roll(Calendar.DAY_OF_MONTH, -1); // sprint finished

    Sprint sprint = new Sprint();
    sprint.setFinalDate(calendar.getTime());
    sprint.setSprintStatus(SprintStatus.RUNNING);

View Full Code Here

     * all story in status different of done should changing status to backlog.
     *
     */

    Calendar calendar = Calendar.getInstance();
    calendar.roll(Calendar.DAY_OF_MONTH, -1); // sprint finished

    Sprint sprint = new Sprint();
    sprint.setFinalDate(calendar.getTime());
    sprint.setSprintStatus(SprintStatus.RUNNING);

View Full Code Here

     * all story in status different of done should changing status for todo.
     *
     */

    Calendar calendar = Calendar.getInstance();
    calendar.roll(Calendar.DAY_OF_MONTH, -1); // sprint finished

    Sprint sprint = new Sprint();
    sprint.setFinalDate(calendar.getTime());
    sprint.setSprintStatus(SprintStatus.RUNNING);

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.