表示API响应中不同事件的时间和类型
我试图在API响应中表示一个“事件”。处理日期和时间的最佳做法(最符合rfc3339?)是什么 选项包括全天事件(单日)、多日事件(可能有也可能没有开始和结束时间)、没有开始时间的事件、只有开始时间的单日事件、有开始和结束时间的单日事件 我的出发点是这样的:表示API响应中不同事件的时间和类型,api,date,datetime,graphql,rfc3339,Api,Date,Datetime,Graphql,Rfc3339,我试图在API响应中表示一个“事件”。处理日期和时间的最佳做法(最符合rfc3339?)是什么 选项包括全天事件(单日)、多日事件(可能有也可能没有开始和结束时间)、没有开始时间的事件、只有开始时间的单日事件、有开始和结束时间的单日事件 我的出发点是这样的: start_date: null or date string (normalized to utc? what format?) start_time: null or time string (normalized to utc? wh
start_date: null or date string (normalized to utc? what format?)
start_time: null or time string (normalized to utc? what format?)
end_date: null or date string (normalized to utc? what format?)
end_time: null or time string (normalized to utc? what format?)
tz: null or timezone string (what format?)
我想知道我是否应该考虑< <代码>日期时间> /代码>字段(或者代替)。还有哪些其他标准/注意事项
此外,这也在GraphQL中实现(不确定这是否重要,但如果重要,则需要考虑一些问题)。。顺便说一句,对于每个字段,null表示什么?你能安排一个有开始时间但没有开始日期的活动吗?完全没有开始日期或时间?。顺便说一句,对于每个字段,null表示什么?你能安排一个有开始时间但没有开始日期的活动吗?完全没有开始日期或时间?