下面是我的ics文件,我想在使用java的ical4j库的文件中添加REFRESH-INTERVAL;VALUE=DURATION:PT12H参数。谁能建议如何执行这个动作?
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//My Company//NONSGML Event Calendar//EN
URL:http://my.calendar/url
NAME:My Calendar Name
X-WR-CALNAME:My Calendar Name
DESCRIPTION:A description of my calendar
X-WR-CALDESC:A description of my calendar
TIMEZONE-ID:Europe/London
X-WR-TIMEZONE:Europe/London
X-PUBLISHED-TTL:PT12H
COLOR:34:50:105
CALSCALE:GREGORIAN
METHOD:PUBLISH
我是这样做的
ParameterList valueDuration = new ParameterList();
valueDuration.add(new Value("DURATION"));
calendar.getProperties().add(new RefreshInterval(valueDuration, java.time.Duration.ofMinutes(30) ));
导致输出
REFRESH-INTERVAL;VALUE=DURATION:PT30M