Hi Munna,

Heres a programme I did about a month ago... based on Zellers congruence...

if you are using day1, month1, year1, day2, month2 year2 you need to parse int these so you can input the dates for the years and the Zellers congruence will return the day for the the dates you entered...

eg:

int day1=Integer.parseInt(args[0]);

int month1=Integer.parseInt(args[1]);

int year1=Integer.parseInt(args[2]);

int day2=Integer.parseInt(args[3]);

int month2=Integer.parseInt(args[4]);

int year2=Integer.parseInt(args[5]);

public static

String dateName( int day, int month, int Year ){

int D = day;

int M = month-2;

if(M<=0){

M=M+12;

}

String Days[] = {" Sunday", "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};

String myYear =Integer.toString(Year);

String CENT=myYear.substring (0,2);

String YR=myYear.substring (2);

int C = Integer.parseInt(CENT);

int Y = Integer.parseInt(YR);

int d1=(int)Math.floor((2.6*M)-02);

int num = d1+D+Y;

int d2 = (int)Math.floor(Y/4);

num = d2 + num;

int d3 = (int)Math.floor(C/4);

num = d3 + num;

num = num - (2*C);

int di = num%7;

String d = Days[di];

return d ;

}

I hope you find this of some use

bye for now

Philby