示例#1
0
 [return: CastToFalse]
 public static __PHP__DateTime DateModify(ScriptContext/*!*/context, __PHP__DateTime datetime, string modify)
 {
     return datetime.modify(context, modify) as __PHP__DateTime;
示例#2
0
 [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;
示例#3
0
        [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;
示例#4
0
 [return: CastToFalse]
 public static object DateFormat(__PHP__DateTime datetime, string format)
 {
     // TODO: format it properly
     return FormatDate(format, datetime.Time, datetime.TimeZone);