Example usage for java.time Month JUNE

List of usage examples for java.time Month JUNE

Introduction

In this page you can find the example usage for java.time Month JUNE.

Prototype

Month JUNE

To view the source code for java.time Month JUNE.

Click Source Link

Document

The singleton instance for the month of June with 30 days.

Usage

From source file:Main.java

public static void main(String[] args) {
    Month m = Month.JUNE;
    System.out.println(m.getValue());
    System.out.println(m.name());
    System.out.println(m.ordinal());
}

From source file:Main.java

public static void main(String[] argv) {
    LocalDate d = LocalDate.of(1491, Month.JUNE, 28);
    System.out.println(d);
}

From source file:Main.java

public static void main(String[] argv) {
    LocalDateTime d = LocalDateTime.of(1491, Month.JUNE, 28, 13, 51);
    System.out.println(d);
}

From source file:Main.java

public static void main(String[] args) {
    LocalDate localDate = LocalDate.of(2014, Month.JUNE, 21);
    DayOfWeek dayOfWeek = DayOfWeek.from(localDate);
    System.out.println(dayOfWeek.getValue());
    dayOfWeek = dayOfWeek.minus(2);// w w w. ja  v  a  2s.  c  o  m
    System.out.println(dayOfWeek.getValue());
}

From source file:Main.java

public static void main(String[] args) {
    LocalDate localDate = LocalDate.of(2014, Month.JUNE, 21);
    DayOfWeek dayOfWeek = DayOfWeek.from(localDate);
    System.out.println(dayOfWeek.getValue());
    dayOfWeek = dayOfWeek.plus(2);/*from w  w w.jav  a 2 s . c o  m*/
    System.out.println(dayOfWeek.getValue());
}

From source file:Main.java

public static void main(String[] args) {
    LocalDate localDate = LocalDate.of(2014, Month.JUNE, 21);
    DayOfWeek dayOfWeek = DayOfWeek.from(localDate);
    System.out.println(dayOfWeek.name());
    System.out.println(dayOfWeek.getValue());
    System.out.println(dayOfWeek.ordinal());
}

From source file:Main.java

public static void main(String[] argv) {
    LocalDate today = LocalDate.now();
    LocalDate longestDay = today.with(Month.JUNE).withDayOfMonth(21);
    int p = Period.between(today, longestDay).getDays();
    System.out.println(p);/*  w w  w  .j  a va 2s. co  m*/
}

From source file:Main.java

public static void main(String[] args) {
    LocalDate localDate = LocalDate.of(2014, Month.JUNE, 21);
    DayOfWeek dayOfWeek = DayOfWeek.from(localDate);
    System.out.println(dayOfWeek.get(ChronoField.DAY_OF_WEEK));
}

From source file:Main.java

public static void main(String[] args) {
    LocalDate localDate = LocalDate.of(2014, Month.JUNE, 21);
    DayOfWeek dayOfWeek = DayOfWeek.from(localDate);
    System.out.println(dayOfWeek.range(ChronoField.DAY_OF_WEEK));
}

From source file:Main.java

public static void main(String[] args) {
    LocalDate localDate = LocalDate.of(2014, Month.JUNE, 21);
    DayOfWeek dayOfWeek = DayOfWeek.from(localDate);
    System.out.println(dayOfWeek.isSupported(ChronoField.DAY_OF_YEAR));
}