本文整理汇总了PHP中DateHelper::getConvertDateFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP DateHelper::getConvertDateFormat方法的具体用法?PHP DateHelper::getConvertDateFormat怎么用?PHP DateHelper::getConvertDateFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateHelper
的用法示例。
在下文中一共展示了DateHelper::getConvertDateFormat方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
$this->config = JBFactory::getConfig();
$input = JFactory::getApplication()->input;
AImporter::model('tour');
$cart = JModelLegacy::getInstance('TourCart', 'bookpro');
$cart->load();
$cart->clear();
$model = new BookProModelTour();
$id = $input->getInt('id');
$this->tour = $model->getComplexItem($id);
$this->itineraries = TourHelper::buildItinerary($id);
//$this->packages = $packages;
$date = TourHelper::getDateFirstInPackagerateFromTourid($this->tour->id);
$this->date = JFactory::getDate($date)->format(DateHelper::getConvertDateFormat('P'));
$this->tour->rdate = $this->date;
$dispatcher = JDispatcher::getInstance();
//$this->_prepareDocument();
// $dispatcher = JDispatcher::getInstance();
// $this->event = new stdClass();
// JPluginHelper::importPlugin('bookpro');
// $results = $dispatcher->trigger('onBookproProductAfterTitle', array ($this->tour));
// $this->event->afterDisplayTitle=isset($results[0])?$results[0]:null;
parent::display($tpl);
}
示例2: getForm
public function getForm($data = array(), $loadData = true)
{
$form = $this->loadForm('com_bookpro.customer', 'customer', array('control' => 'jform', 'load_data' => $loadData));
$form->setFieldAttribute('birthday', 'format', DateHelper::getConvertDateFormat('M'));
if (empty($form)) {
return false;
}
return $form;
}
示例3:
?>
</td>
<td><?php
echo PayStatus::format($subject->pay_status);
?>
</td>
<td><?php
echo OrderStatus::format($subject->order_status);
?>
</td>
<td><?php
echo JFactory::getDate($subject->created)->format(DateHelper::getConvertDateFormat('P'));
?>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="6"><?php
echo JText::_('COM_BOOKPRO_ORDER_UNAVAILABLE');
?>
</td>
</tr>
<?php
示例4: function
echo JText::_('COM_BOOKPRO_ACCEPT_TERM_WARN');
?>
");
return false;
}
});
$("#auto_fill").confirmClick({
text:"<?php
echo JText::_('COM_BOOKPRO_CARD_HOLDER_COMPARE');
?>
",
confirm: function(button) {
var birthday = jQuery('input[name="person[0][birthday]"]').val();
var birthday_compare = formatDate(birthday,"<?php
echo DateHelper::getConvertDateFormat();
?>
");
var standard_birthday = jQuery('#start').val();
//insert birthday if it > 18 years old
var compare = caculateAge(standard_birthday,birthday_compare)
if(compare >= 18){
if(birthday != ''){
autoFill();
}
else{
jAlert('<?php
echo JText::_('COM_BOOKPRO_BIRTHDAY_NULL');
?>
','warning');
示例5: array
echo $this->form->getLabel('lastname');
?>
</div>
<div class="controls"><?php
echo $this->form->getInput('lastname');
?>
</div>
</div>
<div class="control-group">
<div class="control-label"><?php
echo $this->form->getLabel('birthday');
?>
</div>
<div class="controls"><?php
echo JHTML::calendar($this->item->birthday, 'jform[birthday]', 'date', DateHelper::getConvertDateFormat('M'), array('required' => true));
?>
</div>
</div>
<div class="control-group">
<div class="control-label"><?php
echo $this->form->getLabel('email');
?>
</div>
<div class="controls"><?php
echo $this->form->getInput('email');
?>
</div>
</div>
示例6: DateInterval
$a_maxdate = JFactory::getDate($depart_start)->sub(new DateInterval('P12Y'));
$a_maxdate->modify('+1 day');
//(2-12)
$c_mindate = JFactory::getDate($depart_start)->sub(new DateInterval('P12Y'));
$c_mindate->modify('+2 day');
$c_maxdate = JFactory::getDate()->sub(new DateInterval('P3D'));
//(<2)
$i_mindate = JFactory::getDate($depart_start)->sub(new DateInterval('P2Y'));
$i_mindate->modify('+2 day');
$js = '
var a_mindate="' . $a_mindate->format('Y-m-d') . '";
var a_maxdate="' . $a_maxdate->format('Y-m-d') . '";
var c_mindate="' . $c_mindate->format('Y-m-d') . '";
var c_maxdate="' . $c_maxdate->format('Y-m-d') . '";
var i_mindate="' . $i_mindate->format('Y-m-d') . '";
var dateFormat="' . DateHelper::getConvertDateFormat('J') . '";
';
$doc->addScriptDeclaration($js);
?>
<input type="hidden" value="<?php
echo JFactory::getDate($cart->filter['start'])->format('Y-m-d');
?>
" id="pass_start" name="">
<h2 class="block_head">
<span><?php
echo JText::_('COM_BOOKPRO_PASSENGER_INFO');
?>
</span>
</h2>
示例7:
?>
</label>
<div class="controls">
<?php
echo AHtml::calendar(JFactory::getDate($params->start)->format($php_format), 'orderinfo[params][start]', 'orderinfo_date', DateHelper::getConvertDateFormat('J'), 'class="hasDatepicker"');
?>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php
echo JText::_('COM_BOOKPRO_DATE_END');
?>
</label>
<div class="controls">
<?php
echo AHtml::calendar(JFactory::getDate($params->end)->format($php_format), 'orderinfo[params][end]', 'orderinfo_date_end', DateHelper::getConvertDateFormat('J'), 'class="hasDatepicker"');
?>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php
echo JText::_('COM_BOOKPRO_NO_OF_PASSENGER');
?>
</label>
<div class="controls">
<input type="number" min="1" name="orderinfo[adult]" class="input-mini" required value="<?php
echo $this->orderinfo[0]->adult;
?>
"/>
</div>
</div>
示例8: foreach
?>
<form action="<?php
echo JRoute::_('index.php?option=com_bookpro&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
<legend><?php
echo JText::_('COM_BOOKPRO_TRANSPORT_TYPE') . ': ' . TransportHelper::getTransprortType($this->orderComplex->orderinfo[0]->transport_type);
?>
</legend>
<div class="row-fluid">
<div class="span6 form-horizontal">
<?php
foreach ($this->orderComplex->orderinfo as $orderinfo) {
?>
<legend><?php
echo JFactory::getDate($orderinfo->start)->format(DateHelper::getConvertDateFormat()) . ' - ' . $orderinfo->trip->from->title . ' - ' . $orderinfo->trip->to->title;
?>
</legend>
<?php
}
?>
<?php
echo $this->form->renderFieldSet('basic');
?>
<div class="control-group">
<div class="control-label">
<?php
echo JText::_('COM_BOOKPRO_TRANSPORT_FLIGHT_NUMBER');
?>
</div>
示例9: fillCUSTOMIZEInfo
private function fillCUSTOMIZEInfo($input)
{
$input = str_replace('{type}', JText::_('COM_BOOKPRO_CUSTOMIZE_' . $this->orderinfo[0]->type), $input);
$params = json_decode($this->orderinfo[0]->params);
$input = str_replace('{start}', JFactory::getDate($params->start)->format(DateHelper::getConvertDateFormat()), $input);
$input = str_replace('{end}', JFactory::getDate($params->end)->format(DateHelper::getConvertDateFormat()), $input);
$input = str_replace('{notes}', $this->orderinfo[0]->notes, $input);
return $input;
}
示例10:
</td>
<td class="tdorder"><?php
echo JFactory::getDate($params->start)->format(DateHelper::getConvertDateFormat());
?>
</td>
</tr>
<?php
if ($params->end) {
?>
<tr>
<td class="tdtitleorder"><?php
echo JText::_('COM_BOOKPRO_DATE_END');
?>
</td>
<td class="tdorder"><?php
echo JFactory::getDate($params->end)->format(DateHelper::getConvertDateFormat());
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="tdtitleorder"><?php
echo JText::_('COM_BOOKPRO_NO_OF_PASSENGER');
?>
</td>
<td class="tdorder"><?php
echo $this->orderinfo[0]->adult;
?>
</td>
示例11:
?>
</label>
<div class="controls">
<?php
echo AHtml::calendar('', 'orderinfo[params][start]', 'orderinfo_date', DateHelper::getConvertDateFormat('J'), 'class="hasDatepicker"');
?>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php
echo JText::_('COM_BOOKPRO_DATE_END');
?>
</label>
<div class="controls">
<?php
echo AHtml::calendar('', 'orderinfo[params][end]', 'orderinfo_date_end', DateHelper::getConvertDateFormat('J'), 'class="hasDatepicker"');
?>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php
echo JText::_('COM_BOOKPRO_NO_OF_PASSENGER');
?>
</label>
<div class="controls">
<input type="number" min="1" name="orderinfo[adult]" class="input-mini" required/>
</div>
</div>
<div class="control-group">
<label class="control-label"><?php
echo JText::_('COM_BOOKPRO_REQUEST_DESC');
示例12: isset
require_once JPATH_ROOT . '/components/com_bookpro/models/transportcart.php';
$cart = JModelLegacy::getInstance('TransportCart', 'BookPro');
$cart->load();
//echo '<pre>';var_dump($cart);die;
if (!isset($cart->filter['type'])) {
$cart->filter['type'] = modJbTransportHelper::getDefaultType();
}
$cart_from = isset($cart->filter['destfrom']) ? $cart->filter['destfrom'] : 0;
$cart_to = isset($cart->filter['destto']) ? $cart->filter['destto'] : 0;
$cart_pad_to = isset($cart->filter['pad_to']) ? $cart->filter['pad_to'] : 0;
$cart_pad_from = isset($cart->filter['pad_from']) ? $cart->filter['pad_from'] : 0;
$cart_adult = isset($cart->filter['adult']) ? $cart->filter['adult'] : 0;
$cart_child = isset($cart->filter['child']) ? $cart->filter['child'] : 0;
$cart_bag = isset($cart->filter['bag']) ? $cart->filter['bag'] : 0;
$date_format = DateHelper::getConvertDateFormat('P');
$js_format = DateHelper::getConvertDateFormat('J');
$document->addScript(JURI::base() . 'modules/mod_jbtransport_search/assets/js/select2.js');
$document->addScript("http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js");
//$document->addScript("http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/localization/messages_".$local.".js");
$document->addStyleSheet(JURI::root() . 'modules/mod_jbtransport_search/assets/js/timepicker/bootstrap-timepicker.css');
$document->addScript(JURI::base() . 'modules/mod_jbtransport_search/assets/js/timepicker/bootstrap-timepicker.js');
$document->addStyleSheet(JURI::base() . 'modules/mod_jbtransport_search/assets/css/select2.css');
$document->addStyleSheet(JURI::base() . 'modules/mod_jbtransport_search/assets/css/select2-bootstrap.css');
$document->addStyleSheet(JURI::base() . 'modules/mod_jbtransport_search/assets/css/jbtransport_search.css');
//$document->addScript(JURI::root().'modules/mod_jbtransport_search/assets/js/gentleSelect/jquery-gentleSelect.js');
//$document->addStyleSheet(JURI::root().'modules/mod_jbtransport_search/assets/js/gentleSelect/jquery-gentleSelect.css');
$document->addScript(JURI::root() . 'components/com_bookpro/assets/js/bookpro.js');
$document->addScript(JURI::root() . 'modules/mod_jbtransport_search/assets/js/mod_jbtransport_search.js');
$document->addScriptDeclaration('
var text_select_deart_warn="' . JText::_('MOD_BOOKPRO_TRANSPORT_SEARCH_SELECT_DEPARTURE_WARN') . '";
var text_select_return_warn="' . JText::_('MOD_BOOKPRO_TRANSPORT_SEARCH_SELECT_ARRIVAL_WARN') . '";
示例13: DateInterval
<div class="span3" id="formvalidate">
<label><?php
echo JText::_('COM_BOOKPRO_START_DATE_');
?>
</label>
<?php
echo JHtml::calendar(JFactory::getDate()->format('Y-m-d'), 'jform[startdate]', 'startdate', DateHelper::getConvertDateFormat('M'), 'readonly="readonly"');
?>
<label><?php
echo JText::_('COM_BOOKPRO_END_DATE_');
?>
</label>
<?php
echo JHtml::calendar(JFactory::getDate()->add(new DateInterval('P60D'))->format('Y-m-d'), 'jform[enddate]', 'enddate', DateHelper::getConvertDateFormat('M'), 'readonly="readonly"');
?>
<label><?php
echo JText::_('COM_BOOKPRO_WEEK_DAY');
?>
</label>
<?php
echo $this->getDayWeek('weekday[]');
?>
<hr />
<?php
echo $this->loadTemplate('base');
?>
示例14: defined
<?php
defined('_JEXEC') or die('Restricted access');
$addons_depart = $displayData->addons->depart;
$addons_return = $displayData->addons->return;
$formatDate = DateHelper::getConvertDateFormat('P');
if (count($addons_depart) > 0 || count($addons_return) > 0) {
?>
<div style="width:100%;margin:0;text-align:left;font-size:110%"><strong><?php
echo JText::_('COM_BOOKPRO_ADDONS_INFO');
?>
</strong></div>
<div style="margin: 0 10px;">
<table width="100%" align="left" style="border-bottom:1px solid #ccc; ">
<tr >
<?php
if (count($addons_depart) > 0) {
?>
<td width="50%" valign="top">
<b><?php
echo $displayData->orderinfo[0]->trip->from->title . ' - ' . $displayData->orderinfo[0]->trip->to->title . '<br>';
?>
<?php
echo JFactory::getDate($displayData->orderinfo[0]->start)->format($formatDate) . '';
?>
</b>
<?php
foreach ($addons_depart as $addon) {
$params = json_decode($addon->params);
?>
示例15: Copyright
<?php
/*------------------------------------------------------------------------
# default.php - bookpro Component
# ------------------------------------------------------------------------
# author Ngo Van Quan
# copyright Copyright (C) 2015. All Rights Reserved
# license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
# website joombooking.com
-------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$php_format = DateHelper::getConvertDateFormat('P');
AImporter::helper('currency', 'date');
$config = JComponentHelper::getParams('com_bookpro');
$company_name = $config->get('company_name');
$logo = $config->get('company_logo');
$address = $config->get('company_address');
$date = $this->state->get('filter.depart_date');
$route_id = $this->state->get('filter.route_id');
$route = $route_id ? TransportHelper::getTransportDetail($this->item->route_id) : null;
?>
<table style="text-align: left;" width="100%">
<tr>
<td style="border: none;width: 30%;" >
<?php
if ($logo) {
?>
<img src="<?php
echo JUri::root() . $logo;
?>