當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。