def create_from_format(interp, format_string, time_string, w_datetimezone=None): func_name = "DateTime::createFromFormat" w_date = W_DateTime(interp._class_get("DateTime"), []) error = common.initialize_date_from_format(interp, func_name, w_date, format_string, time_string, w_datetimezone) if error: raise PHPException( interp._class_get("Exception").call_args(interp, [interp.space.wrap("%s(): %s" % (func_name, error))]) ) return w_date
def date_create_from_format(interp, format_string, time_string, w_datetimezone=None): w_date = W_DateTime(interp._class_get('DateTime'), []) error = common.initialize_date_from_format( interp, 'date_create_from_format', w_date, format_string, time_string, w_datetimezone ) if error: return interp.space.w_False else: return date
def create_from_format(interp, format_string, time_string, w_datetimezone=None): func_name = "DateTime::createFromFormat" w_date = W_DateTime(interp._class_get('DateTime'), []) error = common.initialize_date_from_format(interp, func_name, w_date, format_string, time_string, w_datetimezone) if error: raise PHPException( interp._class_get('Exception').call_args( interp, [interp.space.wrap("%s(): %s" % (func_name, error))])) return w_date