Commit d549725
authored
[LINST] modify LINST class to only strip '_date' from standard dates (#7260)
These changes were made to reflect the #6923 which was issued to the main branch
Additional changes not in #6923:
modified the "stripping" function to only remove _date if it is positioned at the end of the field name. For example if the user names their date field my_date_of_release_date, previously the function would strip the field name to my; now it would only strip the last _date to become my_date_of_release
removed the check for isset($dateformat) since the code is already converting a null $dateformat to an empty string 2 lines above !
reorganized the if statements to reduce over all complexity
added an exception if the date format does not match any known formats1 parent e8eeebc commit d549725
File tree
2 files changed
+40
-38
lines changed- php/libraries
- test/unittests
2 files changed
+40
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | 561 | | |
569 | 562 | | |
570 | 563 | | |
| |||
582 | 575 | | |
583 | 576 | | |
584 | 577 | | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
597 | 603 | | |
598 | | - | |
599 | | - | |
| 604 | + | |
| 605 | + | |
600 | 606 | | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
608 | 612 | | |
609 | 613 | | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 614 | + | |
616 | 615 | | |
617 | 616 | | |
618 | 617 | | |
619 | 618 | | |
620 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
621 | 625 | | |
622 | 626 | | |
623 | 627 | | |
| |||
956 | 960 | | |
957 | 961 | | |
958 | 962 | | |
959 | | - | |
960 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
0 commit comments