Subversion Repositories SmartDukaan

Rev

Rev 3950 | Rev 5945 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3950 Rev 4275
Line 110... Line 110...
110
    
110
    
111
	public String getWarrantyDate(long timestamp, String brand){
111
	public String getWarrantyDate(long timestamp, String brand){
112
    	Calendar cd = Calendar.getInstance();
112
    	Calendar cd = Calendar.getInstance();
113
    	cd.setTimeInMillis(timestamp);
113
    	cd.setTimeInMillis(timestamp);
114
    	int addition = 12;
114
    	int addition = 12;
115
    	if(brand.equalsIgnoreCase(brand.trim())){
115
    	if(brand.equalsIgnoreCase("blackberry"))	{
116
    		addition = 18;
116
    		addition = 18;
117
    	}
117
    	}
118
    	cd.add(Calendar.MONTH, addition);
118
    	cd.add(Calendar.MONTH, addition);
119
    	SimpleDateFormat dateformat = new SimpleDateFormat("dd/MM/yyyy");
119
    	SimpleDateFormat dateformat = new SimpleDateFormat("dd/MM/yyyy");
120
    	return dateformat.format(cd.getTime());
120
    	return dateformat.format(cd.getTime());