Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active January 25, 2021 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdev/10b020d235aee27ee86cf2c0afc4cc34 to your computer and use it in GitHub Desktop.
Save jasdev/10b020d235aee27ee86cf2c0afc4cc34 to your computer and use it in GitHub Desktop.
Two- and three-padded hours, minutes, seconds, and milliseconds parsers.
let timecodeHours = Prefix(2).pipe(Int.parser(isSigned: false))
let timecodeMinutes = Prefix(2).pipe(Int.parser(isSigned: false))
let timecodeSeconds = Prefix(2).pipe(Int.parser(isSigned: false))
let timecodeMilliseconds = Prefix(3).pipe(Int.parser(isSigned: false))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment