For a wordpress plugin I need the default date format set in options->general. I need the format string (like ‘Y-m-d H:i:s’) for usage in the Carbon library. In the documentation I didn’t find anything related to this.
Leave a Reply
You must be logged in to post a comment.
Date and time formats are stored separately as options.
Use
get_option()
to retrieve the value.E.g.