I am close to my wits’ end (for now), so I decided to run PADate.class for fun through a Java decompiler:
import java.util.GregorianCalendar;
public class PADate
{
private GregorianCalendar gc;
public PADate()
{
this.gc = new GregorianCalendar();
this.gc.set(11, 0);
this.gc.set(13, 0);
this.gc.set(14, 0);
}
public PADate(int paramInt1, int paramInt2, int paramInt3)
{
this.gc = new GregorianCalendar();
this.gc.set(1, paramInt1);
this.gc.set(2, paramInt2 - 1);
this.gc.set(5, paramInt3);
this.gc.set(11, 0);
this.gc.set(13, 0);
this.gc.set(14, 0);
}
public PADate nextDayOfWeek(String paramString)
{
PADate localPADate = new PADate();
localPADate.gc.setTime(this.gc.getTime());
do
{
localPADate.gc.add(5, 1);
}while (!localPADate.getDayOfWeek().equals(paramString));
return localPADate;
}
public int getYear()
{
return this.gc.get(1);
}
public int getMonth()
{
switch (this.gc.get(2)) {
case 0:
return 1;
case 1:
return 2;
case 2:
return 3;
case 3:
return 4;
case 4:
return 5;
case 5:
return 6;
case 6:
return 7;
case 7:
return 8;
case 8:
return 9;
case 9:
return 10;
case 10:
return 11;
case 11:
return 12;
}
return 0;
}
public int getDayOfMonth()
{
return this.gc.get(5);
}
public String getDayOfWeek()
{
switch (this.gc.get(7)) {
case 1:
return "SUN";
case 2:
return "MON";
case 3:
return "TUE";
case 4:
return "WED";
case 5:
return "THU";
case 6:
return "FRI";
case 7:
return "SAT";
}
return "Error";
}
public boolean equals(PADate paramPADate)
{
return (this.gc.get(1) == paramPADate.gc.get(1)) && (this.gc.get(2) == paramPADate.gc.get(2)) && (this.gc.get(5) == paramPADate.gc.get(5));
}
public String toString()
{
return getDayOfMonth() + "-" + getMonth() + "-" + getYear();
}
}
[downloads_box title=”PADate.zip” nocredit=”no”]
PADate.zip
Unzip the folder to get PADate.java
[/downloads_box]
2 responses to “PADate.class”
interesting. haha
😀