summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
Diffstat (limited to 'it.class')
-rw-r--r--it.class10
1 files changed, 3 insertions, 7 deletions
diff --git a/it.class b/it.class
index cc7650b..2978978 100644
--- a/it.class
+++ b/it.class
@@ -712,17 +712,13 @@ static function date($format = "", $stamp = null)
"date:en" => "m/d/Y",
"datetime:en" => "m/d/Y h:ia",
"time:en" => "h:ia",
+ "icsdate" => "Ymd",
);
if (!($formatstring = $formats["$name:$language"]) && !($formatstring = $formats[$name]))
{
- if (it::match('^icsdate', $format)) # Special icsdate or icsdatetime format? Use UTC time format for Google Calendar to be happy
- {
- if ($format == "icsdate")
- return date("Ymd", $stamp) . "Z"; # MUST NOT use gmdate!
- else
- return gmdate("Ymd", $stamp) . "T" . gmdate("His", $stamp) . "Z";
- }
+ if ($format == "icsdatetime") # Special icsdate or icsdatetime format? Use UTC time format for Google Calendar to be happy
+ return gmdate("Ymd", $stamp) . "T" . gmdate("His", $stamp) . "Z";
else
$formatstring = $format;
}