List of usage examples for java.time Instant parse
public static Instant parse(final CharSequence text)
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); System.out.println(instant.atOffset(ZoneOffset.UTC)); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); System.out.println(instant.isSupported(ChronoField.YEAR)); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); System.out.println(instant.isSupported(ChronoUnit.DAYS)); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); System.out.println(instant.getLong(ChronoField.NANO_OF_SECOND)); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); System.out.println(instant.get(ChronoField.NANO_OF_SECOND)); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); System.out.println(instant.range(ChronoField.NANO_OF_SECOND)); }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.plus(100, ChronoUnit.DAYS); System.out.println(instant);//from w w w .j a va 2 s.com }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.truncatedTo(ChronoUnit.DAYS); System.out.println(instant);//from w w w . j a va 2s. com }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); Temporal t = instant.adjustInto(Instant.now()); System.out.println(t);/*from ww w . ja va 2 s . c om*/ }
From source file:Main.java
public static void main(String[] args) { Instant instant = Instant.parse("2014-12-03T10:15:30.00Z"); instant = instant.minus(100, ChronoUnit.DAYS); System.out.println(instant);//from w ww . j a va 2 s .c o m }