Class TimeControl
Description of Time:
This uses a time-of-day value in the form "HH:MM:SS"; similar to the Date tag
except that it denotes the local clock time (hours, minutes, and seconds) of
the start of the game. Note that colons, not periods, are used for field
separators for the Time tag value. The value is taken from the local time
corresponding to the location given in the Site tag pair.
-
pgn\tags\Tag
-
pgn\tags\TimeControl
Methods summary
public
the
|
|
public
boolean
|
#
validate( mixed $data )
Parameters
Returns
boolean returns if a data is valid
Assert("*35")
=== true
Assert("-")
=== true
Assert("-:40/9000:*35:40/9000:300")
=== true
Assert("-:40/9000:30/3000:15/30000:*35")
=== true
Assert("-:40/9000:30/3000:15/30000:300")
=== true
Assert("123,45")
=== false
Assert("22/35.-")
=== false
Assert("300")
=== true
Assert("32/45")
=== true
Assert("32/45:300")
=== true
Assert("35+5")
=== true
Assert("40/9000")
=== true
Assert("?")
=== true
Assert("?.-")
=== false
Assert("?:-:40/9000:300:300:*35")
=== false
Assert("??.??")
=== false
Assert("a")
=== false
Assert("asdf")
=== false
Assert(2)
=== true
Assert(null)
=== false
Todo("-:40/9000:*35:40/9000:300")
=== false
Todo("00/300:-")
=== false
Todo("00/300:?")
=== false
Todo("300:300:*35")
=== false
Todo("300:300:*35:40/9000:-")
=== false
Overrides
|
public static
string
|
#
validPattern( )
Get the regex pattern of a valid FEN tag string
Get the regex pattern of a valid FEN tag string
Returns
string regex pattern of a valid SetUp tag string
Overrides
|