Timestamp is not a type

Timestamps are integers so let's document this correctly
This commit is contained in:
Raphaël Doursenaud 2013-11-07 21:12:11 +01:00
parent 74f83b235a
commit d5ab0723ba
5 changed files with 18 additions and 18 deletions

View File

@ -270,7 +270,7 @@ class ICal
* Return Unix time from ical date time fomrat (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS) * Return Unix time from ical date time fomrat (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS)
* *
* @param string $ical_date String date * @param string $ical_date String date
* @return timestamp * @return int
*/ */
function ical_date_to_unix($ical_date) function ical_date_to_unix($ical_date)
{ {
@ -395,4 +395,4 @@ class ICal
return $this->cal; return $this->cal;
} }
} }
?> ?>

View File

@ -305,8 +305,8 @@ class Propal extends CommonObject
* @param int $fk_fournprice Id supplier price * @param int $fk_fournprice Id supplier price
* @param int $pa_ht Buying price without tax * @param int $pa_ht Buying price without tax
* @param string $label ??? * @param string $label ???
* @param timestamp $date_start Start date of the line * @param int $date_start Start date of the line
* @param timestamp $date_end End date of the line * @param int $date_end End date of the line
* @param array $array_option extrafields array * @param array $array_option extrafields array
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
* *
@ -479,8 +479,8 @@ class Propal extends CommonObject
* @param int $pa_ht Price (without tax) of product when it was bought * @param int $pa_ht Price (without tax) of product when it was bought
* @param string $label ??? * @param string $label ???
* @param int $type 0/1=Product/service * @param int $type 0/1=Product/service
* @param timestamp $date_start Start date of the line * @param int $date_start Start date of the line
* @param timestamp $date_end End date of the line * @param int $date_end End date of the line
* @param array $array_option extrafields array * @param array $array_option extrafields array
* @return int 0 if OK, <0 if KO * @return int 0 if OK, <0 if KO
*/ */
@ -1370,7 +1370,7 @@ class Propal extends CommonObject
* Define proposal date * Define proposal date
* *
* @param User $user Object user that modify * @param User $user Object user that modify
* @param timestamp $date Date * @param int $date Date
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_date($user, $date) function set_date($user, $date)
@ -1407,7 +1407,7 @@ class Propal extends CommonObject
* Define end validity date * Define end validity date
* *
* @param User $user Object user that modify * @param User $user Object user that modify
* @param timestamp $date_fin_validite End of validity date * @param int $date_fin_validite End of validity date
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_echeance($user, $date_fin_validite) function set_echeance($user, $date_fin_validite)
@ -1434,7 +1434,7 @@ class Propal extends CommonObject
* Set delivery date * Set delivery date
* *
* @param User $user Object user that modify * @param User $user Object user that modify
* @param timestamp $date_livraison Delivery date * @param int $date_livraison Delivery date
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
function set_date_livraison($user, $date_livraison) function set_date_livraison($user, $date_livraison)

View File

@ -166,10 +166,10 @@ function getParentCompanyTimeZoneInt($refgmtdate='now')
/** /**
* Add a delay to a date * Add a delay to a date
* *
* @param timestamp $time Date timestamp (or string with format YYYY-MM-DD) * @param int $time Date timestamp (or string with format YYYY-MM-DD)
* @param int $duration_value Value of delay to add * @param int $duration_value Value of delay to add
* @param int $duration_unit Unit of added delay (d, m, y, w) * @param int $duration_unit Unit of added delay (d, m, y, w)
* @return timestamp New timestamp * @return int New timestamp
*/ */
function dol_time_plus_duree($time,$duration_value,$duration_unit) function dol_time_plus_duree($time,$duration_value,$duration_unit)
{ {
@ -317,7 +317,7 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt
* DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore) * DD/MM/YY HH:MM:SS or DD/MM/YYYY HH:MM:SS (this format should not be used anymore)
* @param int $gm 1 =Input date is GM date, * @param int $gm 1 =Input date is GM date,
* 0 =Input date is local date using PHP server timezone * 0 =Input date is local date using PHP server timezone
* @return date Date * @return int Date as a timestamp
* 19700101020000 -> 7200 with gm=1 * 19700101020000 -> 7200 with gm=1
* *
* @see dol_print_date, dol_mktime, dol_getdate * @see dol_print_date, dol_mktime, dol_getdate
@ -812,4 +812,4 @@ function monthArray($outputlangs)
return $montharray; return $montharray;
} }
?> ?>

View File

@ -461,7 +461,7 @@ function dol_filesize($pathoffile)
* Return time of a file * Return time of a file
* *
* @param string $pathoffile Path of file * @param string $pathoffile Path of file
* @return timestamp Time of file * @return int Time of file
*/ */
function dol_filemtime($pathoffile) function dol_filemtime($pathoffile)
{ {

View File

@ -776,7 +776,7 @@ function dol_strftime($fmt, $ts=false, $is_gmt=false)
* Output date in a string format according to outputlangs (or langs if not defined). * Output date in a string format according to outputlangs (or langs if not defined).
* Return charset is always UTF-8, except if encodetoouput is defined. In this case charset is output charset * Return charset is always UTF-8, except if encodetoouput is defined. In this case charset is output charset
* *
* @param timestamp $time GM Timestamps date * @param int $time GM Timestamps date
* @param string $format Output date format * @param string $format Output date format
* "%d %b %Y", * "%d %b %Y",
* "%d/%m/%Y %H:%M", * "%d/%m/%Y %H:%M",
@ -932,7 +932,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
* WARNING: This function always use PHP server timezone to return locale informations. * WARNING: This function always use PHP server timezone to return locale informations.
* Usage must be avoid. * Usage must be avoid.
* *
* @param timestamp $timestamp Timestamp * @param int $timestamp Timestamp
* @param boolean $fast Fast mode * @param boolean $fast Fast mode
* @return array Array of informations * @return array Array of informations
* If no fast mode: * If no fast mode:
@ -989,7 +989,7 @@ function dol_getdate($timestamp,$fast=false)
* @param int $year Year * @param int $year Year
* @param int $gm 1=Input informations are GMT values, otherwise local to server TZ * @param int $gm 1=Input informations are GMT values, otherwise local to server TZ
* @param int $check 0=No check on parameters (Can use day 32, etc...) * @param int $check 0=No check on parameters (Can use day 32, etc...)
* @return timestamp Date as a timestamp, '' if error * @return int Date as a timestamp, '' if error
* @see dol_print_date, dol_stringtotime, dol_getdate * @see dol_print_date, dol_stringtotime, dol_getdate
*/ */
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1) function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
@ -1048,7 +1048,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
* 'tzserver' => we add the PHP server timezone * 'tzserver' => we add the PHP server timezone
* 'tzref' => we add the company timezone * 'tzref' => we add the company timezone
* 'tzuser' => we add the user timezone * 'tzuser' => we add the user timezone
* @return timestamp $date Timestamp * @return int $date Timestamp
*/ */
function dol_now($mode='gmt') function dol_now($mode='gmt')
{ {