fixed: all-day events
This commit is contained in:
parent
816b4f1e77
commit
872b9492db
10
ics.php
10
ics.php
|
@ -72,10 +72,12 @@ function ics2json(input)
|
||||||
|
|
||||||
function dt(s)
|
function dt(s)
|
||||||
{
|
{
|
||||||
return new Date(
|
var formatted = s.substr(0,4) + "-" + s.substr(4,2) + "-" + s.substr(6,2);
|
||||||
s.substr(0,4) + "-" + s.substr(4,2) + "-" + s.substr(6,2)
|
if (s.length > 8)
|
||||||
+ "T"
|
{
|
||||||
+ s.substr(9,2) + ":" + s.substr(11,2) + ":" + s.substr(13,2));
|
formatted += "T" + s.substr(9,2) + ":" + s.substr(11,2) + ":" + s.substr(13,2);
|
||||||
|
}
|
||||||
|
return new Date(formatted);
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatdate(d)
|
function formatdate(d)
|
||||||
|
|
Loading…
Reference in New Issue