Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Normal Play Time Parser

Build Status

PHP parser for Normal Play Time (RFC 2326)

Usage

<?php
use \Podlove\NormalPlayTime\Parser;

// get seconds or milliseconds
Parser::parse("1.834");      // 1834
Parser::parse("1.834", "s"); // 1

// invalid returns NULL
Parser::parse("abc"); // NULL

// valid example NPT strings
Parser::parse("1");        // 1000
Parser::parse("12:34");    // 754000
Parser::parse("12:34.56"); // 754560
Parser::parse("1:2");      // 62000
Parser::parse("1:2:3.4");  // 3723400

About

Normal Play Time parser for PHP (rfc2326)

Resources

Packages

No packages published

Languages