[return: CastToFalse] public static __PHP__DateTime DateModify(ScriptContext/*!*/context, __PHP__DateTime datetime, string modify) { return datetime.modify(context, modify) as __PHP__DateTime;
[return: CastToFalse] public static object DateCreate(ScriptContext/*!*/context, string time, DateTimeZone timezone) { var dt = new __PHP__DateTime(context, true); dt.__construct(context, time, timezone); return dt;
[return: CastToFalse] public static int DateOffsetGet(__PHP__DateTime datetime) { if (datetime == null) { PhpException.ArgumentNull("datetime"); return -1; } if (datetime.TimeZone == null) return -1; return (int)datetime.TimeZone.BaseUtcOffset.TotalSeconds;
[return: CastToFalse] public static object DateFormat(__PHP__DateTime datetime, string format) { // TODO: format it properly return FormatDate(format, datetime.Time, datetime.TimeZone);