Java Calendar Between getFmtCalendar(Calendar c, long betweenTimeout, StringBuilder sb)

Here you can find the source of getFmtCalendar(Calendar c, long betweenTimeout, StringBuilder sb)

Description

get Fmt Calendar

License

Apache License

Declaration

private static void getFmtCalendar(Calendar c, long betweenTimeout, StringBuilder sb) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;

public class Main {
    private static void getFmtCalendar(Calendar c, long betweenTimeout, StringBuilder sb) {
        sb.append("\tspan:");
        sb.append(c.get(Calendar.MINUTE));
        sb.append("m:");
        sb.append(c.get(Calendar.SECOND));
        sb.append("s:");
        sb.append(c.get(Calendar.MILLISECOND));
        sb.append("ms");
        if (betweenTimeout > 0) {
            sb.append("(exceed ");
            sb.append(betweenTimeout);//from   w w w  .  j a  va2 s  .c om
            sb.append("ms)");
        }
        sb.append(".");
    }

    private static void getFmtCalendar(Calendar c, long betweenTimeout, int nResult, StringBuilder sb) {
        // applies
        sb.append("\tapplies:");
        sb.append(nResult);
        sb.append(",");
        // span
        sb.append("span:");
        sb.append(c.get(Calendar.MINUTE));
        sb.append("m:");
        sb.append(c.get(Calendar.SECOND));
        sb.append("s:");
        sb.append(c.get(Calendar.MILLISECOND));
        sb.append("ms");
        if (betweenTimeout > 0) {
            sb.append("(exceed ");
            sb.append(betweenTimeout);
            sb.append("ms)");
        }
        sb.append(".");
    }
}

Related

  1. getDaysBetween(Calendar d1, Calendar d2)
  2. getDaysBetween(Calendar firstDate, Calendar lastDate)
  3. getDaysBetween(Calendar start, Calendar end)
  4. getDaysBetween(Calendar startDate, Calendar endDate)
  5. getDaysBetween(final Calendar start, final Calendar end)
  6. hoursBetween(Calendar start, Calendar end, boolean assumeSameDate)
  7. hoursBetween(Calendar startDate, Calendar endDate)
  8. isBetween(Calendar time, Calendar start, Calendar end)
  9. numberOfDaysBetween(Calendar start, Calendar end)