Delete comment from: Java67
i wrote ths on fly hhahaha im sorry :) goood template thoughh for a calender print
//this code prints the days in month w a name how many skip days in between the months and total days
public class PrintCal{
public static final int DAYINWEEK = 7;
public static final int START = 0;
public static void main(String[] args) {
//month(monthname, totald, skip)
}
public static void month(String monthp, int totald int skip) {
System.out.println(monthp);
System.out.println ("Sun Mon Tue Wed Thu Fri Sat");
for (int i = START;i<=skip; ++i) {
System.out.print ("");
} for (int k = START + 1; k <= DAYINWEEK - skip; ++k) {
System.out.print (k + "\n");
} for (int f = START +1; f <= ((totald + skip)) - 1; f++) {
for (int g =8-skip+(7*g-7); f<=8-skip+6+(7*f-7);++g){
System.out.print(g+ "\n");
}
}for (int i=7-skip+6+(7*(skip + totald)/7)-1)-7+1);i <= totald; ++i) {
System.out.print (i);
}
}
}
Nov 17, 2016, 2:44:31 PM
Posted to How to display date in multiple timezone in Java with Example - PST GMT

