File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ public function __construct(string $flexidate = 'NOW') {
3939 } elseif ( !empty ($ flexidate ) && ($ flexidate != 'NOW ' )) {
4040 $ format = RO ::$ DateFormat ;
4141 }
42+ if (strstr ($ flexidate , ': ' )){ // ?!?!?
43+ $ flexidate = substr ($ flexidate ,0 , -6 );
44+ }
4245 parent ::__construct (empty ($ format ) ? null : \DateTime::createFromFormat ($ format , $ flexidate )->setTime (0 , 0 )->format (\DateTimeInterface::ATOM ));
4346 }
4447
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public function __construct(string $flexidatetime = 'NOW') {
3434 $ format = '' ;
3535 if (strchr ($ flexidatetime , '. ' )) { //NewFormat
3636 $ format = RO ::$ DateTimeFormat ;
37- } elseif ($ flexidatetime != 'NOW ' ) { // Old format
37+ } elseif ( ! empty ( $ flexidatetime) && ( $ flexidatetime != 'NOW ' ) ) { // Old format
3838 $ format = 'Y-m-d\TH:i:s+P ' ;
3939 }
4040 parent ::__construct (empty ($ format ) ? null : \DateTime::createFromFormat ($ format , $ flexidatetime )->format (\DateTimeInterface::ATOM ));
You can’t perform that action at this time.
0 commit comments