Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/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
如何使用URL重定向到Google日历中的某一周?_Url_Google Calendar Api - Fatal编程技术网

如何使用URL重定向到Google日历中的某一周?

如何使用URL重定向到Google日历中的某一周?,url,google-calendar-api,Url,Google Calendar Api,Google Calendar的每周视图有以下URL结构: https://www.google.com/calendar/render#g%7Cweek-2+22897+22903+22900 对于每日视图,我们发现日历从1952年3月8日算起(我知道!)到您想要查看的日期。例如,URL https://www.google.com/calendar/render#g%7Cday-1+22913+22913+22913 指向2014年12月1日 你们能帮我们找到周视图的算法吗?这似乎有点

Google Calendar的每周视图有以下URL结构:

https://www.google.com/calendar/render#g%7Cweek-2+22897+22903+22900
对于每日视图,我们发现日历从1952年3月8日算起(我知道!)到您想要查看的日期。例如,URL

https://www.google.com/calendar/render#g%7Cday-1+22913+22913+22913 
指向2014年12月1日

你们能帮我们找到周视图的算法吗?这似乎有点随机,但背后肯定有一些逻辑,我们无法破解。

只需渲染#h将为您提供一周的时间
只有render#h%7Cday-1会给你当前的时间

请用一个工作示例详细说明你的答案!