Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # Input date and time in ISO 8601 format
  2. # Example: 2001-01-01T00:00:00Z for 1 Jan 2001, 0 GMT
  3.  
  4. var Instant = java.time.Instant;
  5. var ChronoUnit = java.time.temporal.ChronoUnit;
  6. print("Enter date time:");
  7. var sec = Instant.parse(readLine()).
  8. until(Instant.now(), ChronoUnit.SECONDS);
  9. print(sec);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement