문제

I am looking for a QR code that could add a Vcal event with: Start date and time: as of the date and time the code is scanned End date and time: exactly xx weeks after the start date (say 2 weeks)

도움이 되었습니까?

해결책

In iCalendar, you can specify a duration inside a VEVENT with the DURATION property. (See section 4.3.6 of RFC 2445.) You can use this instead of DTEND. The syntax is a little hard to explain; you can see it in the RFC. DURATION:PT1H30M means 1 hour, 30 minutes. DURATION:P2W means two weeks.

So, you can just add this to the VEVENT you were already going to encode in a QR code.

Of course, whether a reader reads it correctly is another story. I can tell you that zxing does not read DURATION. Because I wrote it and I have just learned that DURATION exists. I will add it as a to-do to parse correctly.

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