fork(12) download
  1. import java.time.*;
  2. import java.time.temporal.ChronoUnit;
  3.  
  4. class Ideone
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. LocalDateTime start = LocalDateTime.now();
  9. Period period = Period.parse("P1M");
  10. LocalDateTime end = start.plus(period);
  11. long milliseconds = start.until(end, ChronoUnit.MILLIS);
  12. System.out.println(milliseconds);
  13. }
  14. }
Success #stdin #stdout 0.1s 711168KB
stdin
Standard input is empty
stdout
2678400000