Java Code Examples for java.util.Date#toGMTString()

The following examples show how to use java.util.Date#toGMTString() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
@Override
public CharSequence getDisplayContents() {
    CalendarParsedResult calResult = (CalendarParsedResult) getResult();
    StringBuilder result = new StringBuilder(100);
    ParsedResult.maybeAppend(calResult.getSummary(), result);
    Date start = calResult.getStart();
    String startString = start.toGMTString();
    appendTime(startString, result, false, false);

    Date end = calResult.getEnd();
    String endString = end.toGMTString();
    if (endString != null) {
        boolean sameStartEnd = startString.equals(endString);
        appendTime(endString, result, true, sameStartEnd);
    }

    ParsedResult.maybeAppend(calResult.getLocation(), result);
    ParsedResult.maybeAppend(calResult.getAttendees(), result);
    ParsedResult.maybeAppend(calResult.getDescription(), result);
    return result.toString();
}
 
Example 2
private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeUTC(b);
  if( !d0.equals(d1) ) {
    throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("UTCTime " + text + " ok");
  }
}
 
Example 3
private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeUTC(b);
  if( !d0.equals(d1) ) {
    throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("UTCTime " + text + " ok");
  }
}
 
Example 4
private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeUTC(b);
  if( !d0.equals(d1) ) {
    throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("UTCTime " + text + " ok");
  }
}
 
Example 5
private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeUTC(b);
  if( !d0.equals(d1) ) {
    throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("UTCTime " + text + " ok");
  }
}
 
Example 6
private static  void checkGeneralized(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeGeneralized(b);
  if( !d0.equals(d1) ) {
    throw new Exception("GeneralizedTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("GeneralizedTime " + text + " ok");
  }
}
 
Example 7
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 8
Source Project: hottub   File: TimeParsing.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static  void checkGeneralized(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeGeneralized(b);
  if( !d0.equals(d1) ) {
    throw new Exception("GeneralizedTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("GeneralizedTime " + text + " ok");
  }
}
 
Example 9
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 10
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 11
private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeUTC(b);
  if( !d0.equals(d1) ) {
    throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("UTCTime " + text + " ok");
  }
}
 
Example 12
private static  void checkGeneralized(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeGeneralized(b);
  if( !d0.equals(d1) ) {
    throw new Exception("GeneralizedTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("GeneralizedTime " + text + " ok");
  }
}
 
Example 13
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 14
private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeUTC(b);
  if( !d0.equals(d1) ) {
    throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("UTCTime " + text + " ok");
  }
}
 
Example 15
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 16
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 17
Source Project: hottub   File: TimeParsing.java    License: GNU General Public License v2.0 5 votes vote down vote up
private static  void checkUTC(Date d0, byte[] b, String text) throws Exception {
  Date d1 = decodeUTC(b);
  if( !d0.equals(d1) ) {
    throw new Exception("UTCTime " + text + " failed: " + d1.toGMTString());
  } else {
    System.out.println("UTCTime " + text + " ok");
  }
}
 
Example 18
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 19
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}
 
Example 20
String toText(Date date) {
    if (date == null) {
        return "";
    }

    return date.toGMTString();
}