Last active
March 2, 2021 02:19
-
-
Save mennwebs/e431acff07482713c766f95c90efc63e to your computer and use it in GitHub Desktop.
Thai date from ACF date - formart YYYYMMDD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $acf_date = get_field($date_field, false, false); | |
| $buddhist_year = (int)substr($acf_date, 0, 4) + 543; | |
| echo date_i18n('j F ', strtotime($acf_date)) . $buddhist_year; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment