mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
15 lines
606 B
Text
15 lines
606 B
Text
use util;
|
|
print( strformattime( "%" ) );
|
|
print( strformattime( "%-" ) );
|
|
print( typeof( strformattime( "%Y", 1 ) ) );
|
|
print( strformattime( "ancient %S time", 1 ) );
|
|
var v := strformattime( "reserve buffer %T%T%T%T%T%T", 1 );
|
|
print( len( v ) );
|
|
print( v[len( v ) - 4, 5] );
|
|
|
|
// a format that is not a string is refused outright
|
|
print( strformattime( 1 ) );
|
|
// a timestamp that is not an integer, or one out of range, is a parameter error - the
|
|
// function's own fallback to "now" runs but the parameter error is what the script sees
|
|
print( strformattime( "%Y", "1" ) );
|
|
print( strformattime( "%Y", -1 ) );
|