当前位置: 首页>>代码示例>>PHP>>正文


PHP PropelDateTime::newInstance方法代码示例

本文整理汇总了PHP中PropelDateTime::newInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP PropelDateTime::newInstance方法的具体用法?PHP PropelDateTime::newInstance怎么用?PHP PropelDateTime::newInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PropelDateTime的用法示例。


在下文中一共展示了PropelDateTime::newInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setDate

 /**
  * Sets the value of [date] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Holiday The current object (for fluent API support)
  */
 public function setDate($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->date !== null || $dt !== null) {
         $currentDateAsString = $this->date !== null && ($tmpDt = new DateTime($this->date)) ? $tmpDt->format('Y-m-d') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->date = $newDateAsString;
             $this->modifiedColumns[] = HolidayPeer::DATE;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:dapepe,项目名称:tymio,代码行数:21,代码来源:BaseHoliday.php

示例2: setFecha

 /**
  * Sets the value of [fecha] column to a normalized version of the date/time value specified.
  * 
  * @param      mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as NULL.
  * @return     Venta The current object (for fluent API support)
  */
 public function setFecha($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->fecha !== null || $dt !== null) {
         $currentDateAsString = $this->fecha !== null && ($tmpDt = new DateTime($this->fecha)) ? $tmpDt->format('Y-m-d') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->fecha = $newDateAsString;
             $this->modifiedColumns[] = VentaPeer::FECHA;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:nestorfsandoval,项目名称:2012_pw2_tp2,代码行数:21,代码来源:BaseVenta.php

示例3: setExpedientehistorialFecha

 /**
  * Sets the value of [expedientehistorial_fecha] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Expedientehistorial The current object (for fluent API support)
  */
 public function setExpedientehistorialFecha($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->expedientehistorial_fecha !== null || $dt !== null) {
         $currentDateAsString = $this->expedientehistorial_fecha !== null && ($tmpDt = new DateTime($this->expedientehistorial_fecha)) ? $tmpDt->format('Y-m-d H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->expedientehistorial_fecha = $newDateAsString;
             $this->modifiedColumns[] = ExpedientehistorialPeer::EXPEDIENTEHISTORIAL_FECHA;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:vicbaporu,项目名称:ITRADE,代码行数:21,代码来源:BaseExpedientehistorial.php

示例4: setCreatedAt

 /**
  * Sets the value of [created_at] column to a normalized version of the date/time value specified.
  * 
  * @param      mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as NULL.
  * @return     sfGuardRememberKey The current object (for fluent API support)
  */
 public function setCreatedAt($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->created_at !== null || $dt !== null) {
         $currentDateAsString = $this->created_at !== null && ($tmpDt = new DateTime($this->created_at)) ? $tmpDt->format('Y-m-d H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->created_at = $newDateAsString;
             $this->modifiedColumns[] = sfGuardRememberKeyPeer::CREATED_AT;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:ratibus,项目名称:Crew,代码行数:21,代码来源:BasesfGuardRememberKey.php

示例5: setPauseHoraireEtablissement

	/**
	 * Sets the value of [pause_horaire_etablissement] column to a normalized version of the date/time value specified.
	 * champ non utilise
	 * @param      mixed $v string, integer (timestamp), or DateTime value.
	 *               Empty strings are treated as NULL.
	 * @return     EdtHorairesEtablissement The current object (for fluent API support)
	 */
	public function setPauseHoraireEtablissement($v)
	{
		$dt = PropelDateTime::newInstance($v, null, 'DateTime');
		if ($this->pause_horaire_etablissement !== null || $dt !== null) {
			$currentDateAsString = ($this->pause_horaire_etablissement !== null && $tmpDt = new DateTime($this->pause_horaire_etablissement)) ? $tmpDt->format('H:i:s') : null;
			$newDateAsString = $dt ? $dt->format('H:i:s') : null;
			if ($currentDateAsString !== $newDateAsString) {
				$this->pause_horaire_etablissement = $newDateAsString;
				$this->modifiedColumns[] = EdtHorairesEtablissementPeer::PAUSE_HORAIRE_ETABLISSEMENT;
			}
		} // if either are not null

		return $this;
	} // setPauseHoraireEtablissement()
开发者ID:rhertzog,项目名称:lcs,代码行数:21,代码来源:BaseEdtHorairesEtablissement.php

示例6: setOrdencompraFechaapagar

 /**
  * Sets the value of [ordencompra_fechaapagar] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Ordencompra The current object (for fluent API support)
  */
 public function setOrdencompraFechaapagar($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->ordencompra_fechaapagar !== null || $dt !== null) {
         $currentDateAsString = $this->ordencompra_fechaapagar !== null && ($tmpDt = new DateTime($this->ordencompra_fechaapagar)) ? $tmpDt->format('Y-m-d') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->ordencompra_fechaapagar = $newDateAsString;
             $this->modifiedColumns[] = OrdencompraPeer::ORDENCOMPRA_FECHAAPAGAR;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:21,代码来源:BaseOrdencompra.php

示例7: setConsultaHora

 /**
  * Sets the value of [consulta_hora] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Consulta The current object (for fluent API support)
  */
 public function setConsultaHora($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->consulta_hora !== null || $dt !== null) {
         $currentDateAsString = $this->consulta_hora !== null && ($tmpDt = new DateTime($this->consulta_hora)) ? $tmpDt->format('H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->consulta_hora = $newDateAsString;
             $this->modifiedColumns[] = ConsultaPeer::CONSULTA_HORA;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:21,代码来源:BaseConsulta.php

示例8: setLastLogin

 /**
  * Sets the value of [last_login] column to a normalized version of the date/time value specified.
  * 
  * @param      mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as NULL.
  * @return     sfGuardUser The current object (for fluent API support)
  */
 public function setLastLogin($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->last_login !== null || $dt !== null) {
         $currentDateAsString = $this->last_login !== null && ($tmpDt = new DateTime($this->last_login)) ? $tmpDt->format('Y-m-d H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->last_login = $newDateAsString;
             $this->modifiedColumns[] = sfGuardUserPeer::LAST_LOGIN;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:ratibus,项目名称:Crew,代码行数:21,代码来源:BasesfGuardUser.php

示例9: setFin

 /**
  * Sets the value of [fin] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Registrosala The current object (for fluent API support)
  */
 public function setFin($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->fin !== null || $dt !== null) {
         $currentDateAsString = $this->fin !== null && ($tmpDt = new DateTime($this->fin)) ? $tmpDt->format('Y-m-d H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->fin = $newDateAsString;
             $this->modifiedColumns[] = RegistrosalaPeer::FIN;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:eddypre,项目名称:Quirofano,代码行数:21,代码来源:BaseRegistrosala.php

示例10: setEmpleadoIniciocontrato

 /**
  * Sets the value of [empleado_iniciocontrato] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Empleado The current object (for fluent API support)
  */
 public function setEmpleadoIniciocontrato($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->empleado_iniciocontrato !== null || $dt !== null) {
         $currentDateAsString = $this->empleado_iniciocontrato !== null && ($tmpDt = new DateTime($this->empleado_iniciocontrato)) ? $tmpDt->format('Y-m-d') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->empleado_iniciocontrato = $newDateAsString;
             $this->modifiedColumns[] = EmpleadoPeer::EMPLEADO_INICIOCONTRATO;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:vicbaporu,项目名称:ITRADE,代码行数:21,代码来源:BaseEmpleado.php

示例11: setCargoadmisionFecha

 /**
  * Sets the value of [cargoadmision_fecha] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Cargoadmision The current object (for fluent API support)
  */
 public function setCargoadmisionFecha($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->cargoadmision_fecha !== null || $dt !== null) {
         $currentDateAsString = $this->cargoadmision_fecha !== null && ($tmpDt = new DateTime($this->cargoadmision_fecha)) ? $tmpDt->format('Y-m-d H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->cargoadmision_fecha = $newDateAsString;
             $this->modifiedColumns[] = CargoadmisionPeer::CARGOADMISION_FECHA;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:21,代码来源:BaseCargoadmision.php

示例12: setBancotransaccionFecha

 /**
  * Sets the value of [bancotransaccion_fecha] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Bancotransaccion The current object (for fluent API support)
  */
 public function setBancotransaccionFecha($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->bancotransaccion_fecha !== null || $dt !== null) {
         $currentDateAsString = $this->bancotransaccion_fecha !== null && ($tmpDt = new DateTime($this->bancotransaccion_fecha)) ? $tmpDt->format('Y-m-d H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->bancotransaccion_fecha = $newDateAsString;
             $this->modifiedColumns[] = BancotransaccionPeer::BANCOTRANSACCION_FECHA;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:21,代码来源:BaseBancotransaccion.php

示例13: setDateVisibiliteEleve

	/**
	 * Sets the value of [date_visibilite_eleve] column to a normalized version of the date/time value specified.
	 * Timestamp précisant quand les devoirs sont portés à la conaissance des élèves
	 * @param      mixed $v string, integer (timestamp), or DateTime value.
	 *               Empty strings are treated as NULL.
	 * @return     CahierTexteTravailAFaire The current object (for fluent API support)
	 */
	public function setDateVisibiliteEleve($v)
	{
		$dt = PropelDateTime::newInstance($v, null, 'DateTime');
		if ($this->date_visibilite_eleve !== null || $dt !== null) {
			$currentDateAsString = ($this->date_visibilite_eleve !== null && $tmpDt = new DateTime($this->date_visibilite_eleve)) ? $tmpDt->format('Y-m-d H:i:s') : null;
			$newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
			if ($currentDateAsString !== $newDateAsString) {
				$this->date_visibilite_eleve = $newDateAsString;
				$this->modifiedColumns[] = CahierTexteTravailAFairePeer::DATE_VISIBILITE_ELEVE;
			}
		} // if either are not null

		return $this;
	} // setDateVisibiliteEleve()
开发者ID:rhertzog,项目名称:lcs,代码行数:21,代码来源:BaseCahierTexteTravailAFaire.php

示例14: setOrdencompradetalleCaducidad

 /**
  * Sets the value of [ordencompradetalle_caducidad] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return Ordencompradetalle The current object (for fluent API support)
  */
 public function setOrdencompradetalleCaducidad($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->ordencompradetalle_caducidad !== null || $dt !== null) {
         $currentDateAsString = $this->ordencompradetalle_caducidad !== null && ($tmpDt = new DateTime($this->ordencompradetalle_caducidad)) ? $tmpDt->format('Y-m-d') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->ordencompradetalle_caducidad = $newDateAsString;
             $this->modifiedColumns[] = OrdencompradetallePeer::ORDENCOMPRADETALLE_CADUCIDAD;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:jalvarez14,项目名称:hva,代码行数:21,代码来源:BaseOrdencompradetalle.php

示例15: setTanggal

 /**
  * Sets the value of [tanggal] column to a normalized version of the date/time value specified.
  *
  * @param mixed $v string, integer (timestamp), or DateTime value.
  *               Empty strings are treated as null.
  * @return BarangMasuk The current object (for fluent API support)
  */
 public function setTanggal($v)
 {
     $dt = PropelDateTime::newInstance($v, null, 'DateTime');
     if ($this->tanggal !== null || $dt !== null) {
         $currentDateAsString = $this->tanggal !== null && ($tmpDt = new DateTime($this->tanggal)) ? $tmpDt->format('Y-m-d H:i:s') : null;
         $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;
         if ($currentDateAsString !== $newDateAsString) {
             $this->tanggal = $newDateAsString;
             $this->modifiedColumns[] = BarangMasukPeer::TANGGAL;
         }
     }
     // if either are not null
     return $this;
 }
开发者ID:nurhidayatullah,项目名称:inventory,代码行数:21,代码来源:BaseBarangMasuk.php


注:本文中的PropelDateTime::newInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。