code: public byte[] serialize(Calendar date)
     {
        final String calendarString =
           CALENDAR_FIELDS_SEPARATOR + date.isLenient() + CALENDAR_FIELDS_DELIMITER + date.getFirstDayOfWeek()
              + CALENDAR_FIELDS_DELIMITER + date.getMinimalDaysInFirstWeek() + CALENDAR_FIELDS_DELIMITER
              + date.getTimeZone().getID();
  
        return (format(date) + calendarString).getBytes();
     }
docs: Serialize date (of JCR Value) to the string.
  
  @param date
  @return