import java.util.*;

public class TestCalendar {
  public static void main(String[] args) {
    // Tworzy kalendarz gregoriański na podstawie bieżącej daty i aktualnego czasu
    Calendar calendar = new GregorianCalendar();
    System.out.println("Bieżący czas: " + new Date());
    System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
    System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
    System.out.println("DATE: " + calendar.get(Calendar.DATE));
    System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
    System.out.println("HOUR_OF_DAY: " + 
      calendar.get(Calendar.HOUR_OF_DAY));
    System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
    System.out.println("SECOND: " + calendar.get(Calendar.SECOND));
    System.out.println("DAY_OF_WEEK: " + 
      calendar.get(Calendar.DAY_OF_WEEK));
    System.out.println("DAY_OF_MONTH: " + 
      calendar.get(Calendar.DAY_OF_MONTH));
    System.out.println("DAY_OF_YEAR: " + 
      calendar.get(Calendar.DAY_OF_YEAR));
    System.out.println("WEEK_OF_MONTH: " + 
      calendar.get(Calendar.WEEK_OF_MONTH));
    System.out.println("WEEK_OF_YEAR: " + 
      calendar.get(Calendar.WEEK_OF_YEAR));
    System.out.println("AM_PM: " + calendar.get(Calendar.AM_PM));
    
    // Kalendarz dla 25 grudnia 1997
    Calendar calendar1 = new GregorianCalendar(1997, 11, 25);
    String[] dayNameOfWeek = {"Niedziela", "Poniedziałek", "Wtorek", "Środa",
        "Czwartek", "Piątek", "Sobota"};
    System.out.println("25 grudnia 1997 to " +
      dayNameOfWeek[calendar1.get(Calendar.DAY_OF_WEEK) - 1]);
  }
}
