finished!
[mdref/mdref-pq] / pq / DateTime.md
1 # class pq\DateTime extends DateTime implements JsonSerializable
2
3 A simple DateTime wrapper with predefined formats which supports stringification and JSON.
4
5 ## Formats:
6
7 Type | Format
8 -----|-------
9 pq\Types::DATE | "Y-m-d"
10 pq\Types::ABSTIME | "Y-m-d H:i:s"
11 pq\Types::TIMESTAMP | "Y-m-d H:i:s.u"
12 pq\Types::TIMESTAMPTZ | "Y-m-d H:i:s.uO"
13
14 > ***NOTE:***
15 Date/time values will conly be converted to pq\DateTime and from DateTime if the pq\Result::CONV_DATETIME bit is set in pq\Result::$autoConvert.
16
17 ## Properties:
18
19 * public string $format = "Y-m-d H:i:s.uO"
20 The default format of any date/time type automatically converted by pq\Result (depends on the actual type of the column).
21
22
23