suve

awful: function: dt-encode

Declaration

float :dt-encode ( int $Y , int $M , int $D , int $H , int $MIN , int $S , int $MS )
float :dt-encode ( int $Y , int $M , int $D , int $H , int $MIN , int $S )
float :dt-encode ( int $Y , int $M , int $D , int $H , int $MIN )
float :dt-encode ( int $Y , int $M , int $D , int $H )
float :dt-encode ( int $Y , int $M , int $D )
float :dt-encode ( int $Y , int $M )
float :dt-encode ( int $Y )

Summary

Creates a DateTime value corresponding to given date and time. When omitted, H, MIN, S and MS default to 0, whereas Y, M and D default to 1. If provided values are invalid (e.g. month outside 1-12 range), NIL is returned.

Example

# :dt-encode example.
!if :ge (:dt-now | :dt-encode i2014 i10 i1)
    :writeln s'Someone wake up Billie Joe!'
!else
    :writeln s"Don't wake up Billie Joe before September ends."
!fi

wikistrona zmodyfikowana 2014/0601/2317