1

创建没有 Recurrence.Range.End 日期的日历事件失败并显示以下消息:

{
    "error": {
        "code": "ErrorRecurrenceEndDateTooBig",
         "message": "Recurrence end date can not exceed Sep 1, 4500 00:00:00."
    }
}

我尝试了将此日期设置为 UTC 零日期并完全删除参数的请求。这个问题可能与这篇文章有关。

示例请求:

1) 没有 Recurrence.Range.End:

{
    "Subject": "test event",
    "Body": {
        "ContentType": "HTML",
        "Content": "sadsad"
    },
    "Start": "2015-05-27T00:00:00.000Z",
    "End": "2015-05-27T00:30:00.000Z",
    "Attendees": [],
    "Recurrence": {
        "Pattern": {
            "DayOfMonth": 0,
            "Month": 0,
            "Type": "Daily",
            "Interval": 3,
            "FirstDayOfWeek": "Sunday"
        },
        "Range": {
            "NumberOfOccurrences": 0,
            "Type": "NoEnd"
        }
    }
}

2) 使用 Recurrence.Range.Start:

    {
    "Subject": "No title",
    "Body": {
        "ContentType": "HTML",
        "Content": "sadsad"
    },
    "Start": "2015-05-27T03:30:00.000Z",
    "End": "2015-05-27T04:00:00.000Z",
    "Attendees": [],
    "Recurrence": {
        "Pattern": {
            "DayOfMonth": 0,
            "Month": 0,
            "Type": "Daily",
            "Interval": 3,
            "FirstDayOfWeek": "Sunday"
        },
        "Range": {
            //Actually this is the way this field comes when reading such 
            //events from the REST API, which is a bit strange:
            "EndDate": "0001-01-01T00:00:00Z",
            "NumberOfOccurrences": 0,
            "Type": "NoEnd"
        }
    }
}

谁能检查我是否遗漏了什么或者这是一个问题(错误)?谢谢。

4

1 回答 1

2

您需要将该StartDate字段包含在Range.

"Range": {
    "StartDate": "2015-05-27T00:00:00Z",
    "EndDate": "0001-01-01T00:00:00Z",
    "NumberOfOccurrences": 0,
    "Type": "NoEnd"
}
于 2015-05-28T13:33:38.130 回答