Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
表示API响应中不同事件的时间和类型_Api_Date_Datetime_Graphql_Rfc3339 - Fatal编程技术网

表示API响应中不同事件的时间和类型

表示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

我试图在API响应中表示一个“事件”。处理日期和时间的最佳做法(最符合rfc3339?)是什么

选项包括全天事件(单日)、多日事件(可能有也可能没有开始和结束时间)、没有开始时间的事件、只有开始时间的单日事件、有开始和结束时间的单日事件

我的出发点是这样的:

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表示什么?你能安排一个有开始时间但没有开始日期的活动吗?完全没有开始日期或时间?