Commit 1f26a9b5 authored by Nils Goroll's avatar Nils Goroll

doc: be concise about about std.real2integer / std.real2time

parent 5a239cbc
......@@ -195,16 +195,21 @@ Example
$Function INT real2integer(REAL r, INT fallback)
Description
Converts the real *r* to an integer. If conversion fails,
Rounds the real *r* to the nearest integer, but round halfway
cases away from zero (see round(3)). If conversion fails,
*fallback* will be returned.
Example
set req.http.integer = std.real2integer(1140618699.00, 0);
set req.http.posone = real2integer( 0.5, 0); # = 1.0
set req.http.negone = real2integer(-0.5, 0); # = -1.0
$Function TIME real2time(REAL r, TIME fallback)
Description
Converts the real *r* to a time. If conversion fails,
*fallback* will be returned.
Rounds the real *r* to the nearest integer (see
`func_real2integer`_) and returns the corresponding time when
interpreted as a unix epoch. If conversion fails, *fallback*
will be returned.
Example
set req.http.time = std.real2time(1140618699.00, now);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment