
import java.util.*;
import java.util.Calendar.*;

public class sessionInfo {
    java.util.Calendar calendar = java.util.Calendar.getInstance();
    private int month = calendar.get(java.util.Calendar.MONTH);
    
    private int year =calendar.get(java.util.Calendar.YEAR);
    private int day = calendar.get(java.util.Calendar.DAY_OF_MONTH);
    private int time = -1;
    private int userID= 1;
    /** Creates new time */
    public int sessionInfo() {
       
      // this.month = java.util.Calendar.MONTH;
       this.time= time;
       this.year = year;
       this.day = day;
       this.month = month;
       this.userID = userID;
       return 1;
    }
public int getUserID(){
  return this.userID;
}

public void setUserID(int i){
    this.userID = i;
  
}


public int getTime(){
 return this.time;
}

public void setTime(int t){
 this.time = t;
}

    public void setMonth(int m){
      this.month =m;


}

 public void setYear(int y){
      this.year =y;


}

 public void setDay(int d){
      this.day =d;

}


 public int getMonth(){
      return this.month;


}

 public String getMonth_String(){
       String months[]= {"Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"};
       return months[this.month];
}
 
 public String getMonth_String(int n){
       while(n > 11){
       n /= 12;
       n -= 1;
       }
       while(n < 0)
       {
       n += 12;
       }
       String months[]= {"Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"};
       return months[n];
}
 

 public int getDay(){
      return this.day;


}
 

 public int getYear(){
      return this.year;


}  


public void setMonth(String m){
          if ("Jan".equals(m) ){
                       this.setMonth(0);
                      }
           else if ("Feb".equals(m)){
                        this.setMonth(1);
                      }
           else if ("Mar".equals(m)){
                        this.setMonth(2);
                      }
           else if ("Apr".equals(m)){
                       this.setMonth(3);
                      }
           else if ("May".equals(m)){
                        this.setMonth(4);
                      }
           else if ("June".equals(m)){
                        this.setMonth(5);
                      }
           else if ("July".equals(m)){
                        this.setMonth(6);
                      }
           else if ("Aug".equals(m)){
                        this.setMonth(7);
                      }
           else if ("Sept".equals(m)){
                        this.setMonth(8);;
                      }
           else if ("Oct".equals(m)){
                        this.setMonth(9);
                      }
           else if ("Nov".equals(m)){
                        this.setMonth(10);
                      }
           else if ("Dec".equals(m)){
                        this.setMonth(11);
                     }
           else {
                 
                   System.out.println("this is not a real month");
                }
      

      }
}
