suve

awful: function: dt-make

Declaration

float :dt-make ( int $DAYS , int $HOURS , int $MINUTES , int $SECONDS , int $MSECS )
float :dt-make ( int $DAYS , int $HOURS , int $MINUTES , int $SECONDS )
float :dt-make ( int $DAYS , int $HOURS , int $MINUTES )
float :dt-make ( int $DAYS , int $HOURS )
float :dt-make ( int $DAYS )

Summary

Returns a DateTime value representing the given number of days, hours, et cetera. This value can be used to advance/retract another DateTime value by desired amount of time. Omitted values default to 0.

Example

# :dt-make example
:set &dt :dt-now
:sub &dt :dt-make i7 i6 i30
:write s'7 days, 6 hours and 30 minutes ago it was '
:write :dt-str s'A, D O Y, H:I:S' $dt

wikistrona zmodyfikowana 2014/0601/2317