13 var_dump(new Timestamp);
15 echo "caught empty\n";
17 $full = "2021-12-07T14:08:51+00:00";
18 var_dump($t=new Timestamp(Timestamp\Precision::Day, datetime:$full),(string)$t);
19 var_dump($t=new Timestamp(Timestamp\Precision::Day->value, datetime:$full),(string)$t);
20 var_dump($t=new Timestamp(Timestamp\Precision::Min, datetime:"2020-10-01"),(string)$t);
21 var_dump($t=new Timestamp(Timestamp\Precision::Day, "!Y-m", "2000-10"),(string)$t);
23 var_dump(ion\unserialize(ion\serialize(clone new ion\Timestamp(ion\Timestamp\Precision::Sec, DateTime::RFC3339, "1971-02-03T04:05:06Z"))));
29 object(ion\Timestamp)#%d (5) {
35 string(26) "2021-12-07 14:08:51.000000"
41 string(11) "2021-12-07T"
42 object(ion\Timestamp)#%d (5) {
48 string(26) "2021-12-07 14:08:51.000000"
54 string(11) "2021-12-07T"
55 object(ion\Timestamp)#%d (5) {
59 string(11) "Y-m-d\TH:iP"
61 string(26) "2020-10-01 00:00:00.000000"
67 string(22) "2020-10-01T00:00+02:00"
68 object(ion\Timestamp)#%d (5) {
74 string(26) "2000-10-01 00:00:00.000000"
80 string(11) "2000-10-01T"
81 object(ion\Timestamp)#8 (3) {
85 string(13) "Y-m-d\TH:i:sP"
87 string(26) "1971-02-03 04:05:06.000000"