public function parse_position($string)
    {

        if (empty($string)) return array();

        // get the timestamp for this year
        $time_array = array(
            'range'    => '*',
            'interval' => false
        );

        if ($string == '*') {
            return $time_array;
        } else if (preg_match('/^(\d{4})$/', $string)) {
            $time_array['range'] = $string;

            return $time_array;
        } else {
            $time_array['range'] = array();
            switch (true) {
                // first check if it's a list
                case (strpos($string, ',') !== false) :
                    $multi_pos = explode(',', $string);
                    $interval  = false;
                    foreach ($multi_pos as $pos) {
                        switch (true) {
                            // get the interval first than proceed to the next
                            case (($pos_pos = strpos($pos, '/')) !== false) :
                                $interval = explode('/', $pos);
                                $pos      = substr($pos, 0, -(strlen($pos) - $pos_pos));
                            // check the ranges
                            default :
                                $time_array['range'][] = array(
                                    'range'    => $pos,
                                    'interval' => $interval[1]
                                );
                                $interval              = false;
                                break;

                        }
                    }
                    break;
                // check if it's a range
                case (strpos($string, '-') !== false) :
                    // get the interval first than proceed
                    if (($pos_pos = strpos($string, '/')) !== false) {
                        $interval               = explode('/', $string);
                        $time_array['interval'] = $interval[1];
                        $string                 = substr($string, 0, -$pos_pos);
                    }
                    $time_array['range'] = $string;
                    break;
                // check if it's an interval
                case (strpos($string, '/') !== false) :
                    $multi_pos              = explode('/', $string);
                    $time_array['range']    = $multi_pos[0];
                    $time_array['interval'] = $multi_pos[1];
                    break;
            }
        }

        return $time_array;
    }