trq/timeperiod

Parse string representation of time into minutes.

dev-develop / 1.0.x-dev 2014-10-23 03:05 UTC

This package is not auto-updated.

Last update: 2024-11-19 03:16:42 UTC


README

Parse string representation of time into minutes.

Installation

Install via composer

composer require 'trq/timeperiod'

Usage

<?php

echo (new Trq\TimePeriod\Resolver)
    ->parse('1h 20m')
    ->getMinutes(); // 80

More examples can be found in spec/Trq/TimePeriod/ResolverSpec.php