public String matt2browser(){
 /*[["Vasya"],["Mon","Tue","Wen","Thu"],["20.09","21.09","22.09","23.09"]
 ,["10:00","10:30","11:00","11:30","12:00"]
 ,[[0,1,0,0],[1,0,0,1],[0,0,1,1],[0,0,0,1]
 ,[1,1,0,1]]]*/  //getting this view for browser.
 
 StringBuffer daysStr=null;
 String name=data.getName();
 Date startDate=data.getStartDate();
 int nDays=data.getnDays();
 int startHour=data.getStartHour();
 int endHour=data.getEndHour();
 int timeSlot=data.getTimeSlot();
 int timeSlots;
 int hours=0;
 
 if (!(startHour==endHour)) {
  if (startHour < endHour) {
   hours = (endHour - startHour) * 60;
  } else {
   hours = (24 - startHour + endHour) * 60;
  }
  timeSlots=hours/timeSlot;
 }
 else{
  hours = (24 - startHour + endHour) * 60;
  timeSlots=(hours/timeSlot)-1;
 }
 
 Calendar cal = new GregorianCalendar(Locale.US);
 cal.setTime(startDate);
   
 SimpleDateFormat dfDays=new SimpleDateFormat("EEE",Locale.US); 
 daysStr = new StringBuffer();
 daysStr.append("[[");
 daysStr.append('"');
 daysStr.append(name);
 daysStr.append('"');
 daysStr.append("],[");
 daysStr.append('"');
 daysStr.append(dfDays.format(cal.getTime()));
 daysStr.append('"');
 for(int i=1;i<nDays;i++){
  daysStr.append(delimiter);
  cal.add(Calendar.DAY_OF_WEEK, 1);
  daysStr.append('"');
  daysStr.append(dfDays.format(cal.getTime()));
  daysStr.append('"');
 } daysStr.append("],");
 
 cal.setTime(startDate);
 dfDays.applyPattern("dd.MMM");
 daysStr.append("[");
 daysStr.append('"');
 daysStr.append(dfDays.format(cal.getTime()));
 daysStr.append('"');
 for(int i=1;i<nDays;i++){
  daysStr.append(delimiter);
  cal.add(Calendar.DAY_OF_WEEK, 1);
  daysStr.append('"');
  daysStr.append(dfDays.format(cal.getTime()));
  daysStr.append('"');
 } daysStr.append("],");
 
 cal.setTime(startDate);
 cal.set(Calendar.HOUR_OF_DAY,startHour);
 cal.set(Calendar.MINUTE,0);
 dfDays.applyPattern("HH:mm");
 daysStr.append("[");
 daysStr.append('"');
 daysStr.append(dfDays.format(cal.getTime()));
 daysStr.append('"');
 for(int i=1;i<timeSlots;i++){
  daysStr.append(delimiter);
  cal.add(Calendar.MINUTE, timeSlot);
  daysStr.append('"');
  daysStr.append(dfDays.format(cal.getTime()));
  daysStr.append('"');
 } daysStr.append("],");
 
 if(slots!=null){
  Object[] tmpArr=slots.toArray();
   daysStr.append("[");
   int count=0;
  for(int i=0;i<timeSlots;i++){
   daysStr.append("[");
   count=i;
   for(int j=0;j<nDays;j++){
  if((boolean) tmpArr[count].equals(true)){
  daysStr.append(1);}
  else{
  daysStr.append(0);}
  daysStr.append(',');
  count=count+timeSlots;
   }
   daysStr.insert(daysStr.length()-1, "]");
   }
  int t=daysStr.length();
  daysStr.setLength(t-1);
  daysStr.append("]]");
  } 
 return daysStr.toString();
}