Skip to content

Instantly share code, notes, and snippets.

@cbrunnkvist
Last active October 1, 2018 13:23
Show Gist options
  • Save cbrunnkvist/3b9eb9d84a58d32041f33cf64a1305d0 to your computer and use it in GitHub Desktop.
Save cbrunnkvist/3b9eb9d84a58d32041f33cf64a1305d0 to your computer and use it in GitHub Desktop.
E2E verification testing Node.js -> Scala ISOString datetime conversion
node -e 'd=new Date("2000-01-01");console.error(`Start JS: ${d}`);console.log(d)' \
| xargs scala -nc -e 'val d=java.time.OffsetDateTime.parse(args.head);System.err.println(s"In Scala: $d");println(d)' \
| xargs node -e 'd=new Date(process.argv.pop());console.error(`End JS: ${d} ;-)`);console.log(d)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment