src/DateRepetition/DateRepetitionInterpeter.php
public static function convertDateRepetitionToString(DateRepetition $dateRepetition)
    {
        $dateString = '';
        if($dateRepetition instanceof HourlyDateRepetition) {
            $prefix = 'hourly';
            $timeString = ' at minute ' . $dateRepetition->getMinute();
        }

        if($dateRepetition instanceof DailyDateRepetition) {
            $prefix = 'daily';
            $timeString = ' at ' . $dateRepetition->getHour() . ':' . $dateRepetition->getMinute();
        }

        if($dateRepetition instanceof WeeklyDateRepetition) {
            $prefix = 'weekly';
            $dateString = ' on ' . $dateRepetition->getDay();
        }
        return $prefix . $dateString . $timeString;
    }
public static function convertDateRepetitionToString(DateRepetition $dateRepetition)
    {
        $dateString = '';
        if($dateRepetition instanceof HourlyDateRepetition) {
            $prefix = 'hourly';
            $timeString = ' at minute ' . $dateRepetition->getMinute();
        }

        if($dateRepetition instanceof DailyDateRepetition) {
            $prefix = 'daily';
            $timeString = ' at ' . $dateRepetition->getHour() . ':' . $dateRepetition->getMinute();
        }

        if($dateRepetition instanceof WeeklyDateRepetition) {
            $prefix = 'weekly';
            $dateString = ' on ' . $dateRepetition->getDay();
        }
        return $prefix . $dateString . $timeString;
    }
public static function convertDateRepetitionToString ( DateRepetition $ dateRepetition ) { $ dateString = '' ; if ( $ dateRepetition instanceof HourlyDateRepetition ) { $ prefix = 'hourly' ; $ timeString = ' at minute ' . $ dateRepetition -> getMinute ( ) ; } if ( $ dateRepetition instanceof DailyDateRepetition ) { $ prefix = 'daily' ; $ timeString = ' at ' . $ dateRepetition -> getHour ( ) . ':' . $ dateRepetition -> getMinute ( ) ; } if ( $ dateRepetition instanceof WeeklyDateRepetition ) { $ prefix = 'weekly' ; $ dateString = ' on ' . $ dateRepetition -> getDay ( ) ; } return $ prefix . $ dateString . $ timeString ; }
converts DateRepetition to a string accepted by 'newDateRepetitionFromString'

@param DateRepetition
@return string
converts DateRepetition to a string accepted by newDateRepetitionFromString