Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Input date and time in ISO 8601 format
- # Example: 2001-01-01T00:00:00Z for 1 Jan 2001, 0 GMT
- var Instant = java.time.Instant;
- var ChronoUnit = java.time.temporal.ChronoUnit;
- print("Enter date time:");
- var sec = Instant.parse(readLine()).
- until(Instant.now(), ChronoUnit.SECONDS);
- print(sec);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement