本文整理汇总了PHP中QuickBooks_Utilities::date方法的典型用法代码示例。如果您正苦于以下问题:PHP QuickBooks_Utilities::date方法的具体用法?PHP QuickBooks_Utilities::date怎么用?PHP QuickBooks_Utilities::date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QuickBooks_Utilities
的用法示例。
在下文中一共展示了QuickBooks_Utilities::date方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _AddRequest
//.........这里部分代码省略.........
$Object->set($begi . 'County', $value);
//print_r($map);
$map = substr($map, 0, -5) . 'County';
//die();
}
// OK, the paths look like this:
// CustomerRet FirstName
//
// We don't need the 'CustomerRet' part of it, that's actually incorrect, so we'll strip it off
$explode = explode(' ', $map);
$first = trim(current($explode));
$map = trim(implode(' ', array_slice($explode, 1)));
if (stripos($action, 'add') !== false) {
$map = str_replace('Ret', 'Add', $map);
} else {
$map = str_replace('Ret', 'Mod', $map);
}
//print(' OK, handling [' . $map . ']' . "\n");
if (false === strpos($map, ' ')) {
if ($schema_object->exists($map)) {
$use_in_request = true;
// If this version doesn't support this field, skip it
if ($schema_object->sinceVersion($map) > $version and $schema_object->sinceVersion($map) < 100.0) {
$use_in_request = false;
}
switch ($schema_object->dataType($map)) {
case 'AMTTYPE':
$value = str_replace(',', '', number_format($value, 2));
break;
case 'DATETYPE':
if (!$value or $value == '0000-00-00') {
$use_in_request = false;
} else {
$value = QuickBooks_Utilities::date($value);
}
break;
case 'DATETIMETYPE':
if (!$value or $value == '0000-00-00 00:00:00') {
$use_in_request = false;
} else {
$value = QuickBooks_Utilities::datetime($value);
}
break;
case 'BOOLTYPE':
if ($value == 1) {
$value = 'true';
} else {
if ($value == 0) {
$value = 'false';
} else {
$use_in_request = false;
}
}
break;
default:
break;
}
if ($use_in_request) {
$Child = new QuickBooks_XML_Node($map);
$Child->setData($value);
$Node->addChild($Child);
}
} else {
// ignore it
}
} else {