문제

I am looking for a library (php) or some pseudocode to parse Ical RRULEs to readable text(like for example google calendar)

RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=1FR,3FR,5FR

-> Monthly on Friday of weeks 1, 3, 5 of the month

올바른 솔루션이 없습니다

다른 팁

I was wondering the same thing and I struggled to find one, but I found one which is still in development, and you can find it here: https://github.com/simshaun/recurr/tree/v0.2-dev

I was able to get it working with this code:

$timezone        = 'America/New_York';
$startDate       = new \DateTime('2013-06-12 20:00:00', new \DateTimeZone($timezone));
$rule            = new \Recurr\Rule('FREQ=MONTHLY;COUNT=5', $startDate, $timezone);
$textTransformer = new  \Recurr\Transformer\TextTransformer();
echo $textTransformer->transform($rule);

I believe it's not perfect yet and I guess it's still changing while in dev, but looks very promising.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top