List of usage examples for java.util Calendar LONG
int LONG
To view the source code for java.util Calendar LONG.
Click Source Link
From source file:Main.java
public static void main(String[] args) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); String n = now.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); System.out.printf(n);/*from w w w . j a v a 2 s . c o m*/ }
From source file:JapaneseCalendar.java
public static void main(String args[]) { Locale locale = new Locale("ja", "JP", "JP"); Calendar now = Calendar.getInstance(locale); Map<String, Integer> names = now.getDisplayNames(Calendar.ERA, Calendar.LONG, locale); System.out.printf("%s%n", names); System.out.printf("It is year %tY of the current era%n", now); System.out.printf("The calendar class is: %s%n", now.getClass().getName()); }
From source file:DisplayNames.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); // Locale locale = Locale.getDefault(); Locale locale = Locale.ITALIAN; Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); System.out.println(names);/*from w ww .j a v a 2s . c o m*/ String name = now.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); System.out.printf("Today is a %s.%n", name); }
From source file:Main.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); SortedMap<String, Integer> nav = new TreeMap<String, Integer>(names); System.out.printf("Whole list:%n%s%n", nav); System.out.printf("First key: %s\tFirst entry: %s%n", nav.firstKey(), nav.firstEntry()); }
From source file:Main.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); NavigableMap<String, Integer> nav = new TreeMap<String, Integer>(names); System.out.printf("Whole list:%n%s%n", nav); System.out.printf("Key higher after Sunday: %s%n", nav.higherKey("Sunday")); }
From source file:Main.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); NavigableMap<String, Integer> nav = new TreeMap<String, Integer>(names); System.out.printf("Whole list:%n%s%n", nav); System.out.printf("Map before Sunday: %s%n", nav.navigableKeySet()); }
From source file:Main.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); NavigableMap<String, Integer> nav = new TreeMap<String, Integer>(names); System.out.printf("Whole list:%n%s%n", nav); System.out.printf("Last key: %s\tLast entry: %s%n", nav.lastKey(), nav.lastEntry()); }
From source file:Main.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); NavigableMap<String, Integer> nav = new TreeMap<String, Integer>(names); System.out.printf("Whole list:%n%s%n", nav); System.out.printf("Key floor before Sunday: %s%n", nav.floorKey("Sunday")); }
From source file:NavigableMapSample.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); NavigableMap<String, Integer> nav = new TreeMap<String, Integer>(names); System.out.printf("Whole list:%n%s%n", nav); }
From source file:NavigableMapSample.java
public static void main(String args[]) { Calendar now = Calendar.getInstance(); Locale locale = Locale.getDefault(); Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale); NavigableMap<String, Integer> nav = new TreeMap<String, Integer>(names); System.out.printf("Whole list:%n%s%n", nav); System.out.printf("Key lower before Sunday: %s%n", nav.lowerKey("Sunday")); }