来自日期时间集合的规则

Rrule from Datetime collection

我正在制作一个经常性的 activity 日历系统,但我遇到了一个问题。我的 activity 有一组 Period 项目,其中包含 StartedAt Datetime 和 EndedAt Datetime。

很多库允许我将我的 RRule 从字符串转换为类似句点的项目,但似乎相反(将多个 "DateTime-couples" 转换为 RRule 字符串)并不常见.

关于这个的任何选项?

A lot of libs allow me to convert my RRule from a string to Period-like items, but it seems that the reverse (Having multiple "DateTime-couples" converted to a RRule string) isn't common at all.

那是因为这是不可能的。给定的 RRule 生成一个且仅一组事件,但反之则不然 - 一组给定的事件可以由多个 RRule 生成。

换句话说,不可能知道生成日期集合的确切规则。