Spanish date (PHP 7.1)

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 11, 2019   (RSS)

By Jesus - January 17, 2019

Hi,

I just made a PHP upgrade to use 7.1, but I had this code running there, for the Spanish date.

<?php echo spanishDate($blogRecord['fecha'], "l j F Y"); ?>

I'm getting this message:

#381 - UNCAUGHT_EXCEPTION: Call to undefined function spanishDate()

I think its a compatibility issue or something like that, Does anyone know how to adjust this value to have my date in Spanish with this new PHP version?

Thank you!

By daniel - January 18, 2019

Hi Jesus,

From what I can tell, the spanishDate() function is not a native function in PHP, nor is it a function in CMSB. It's possible that it was a custom function created specifically for your site. My first suggestion would be to search for this function to see if it is still being defined in any other files so that you can include it where it's needed. If not, my next suggestion would be to look at the strftime() and setlocale() functions; it looks like they can be used to output dates in different localizations.

http://us2.php.net/manual/en/function.strftime.php
http://us2.php.net/manual/en/function.setlocale.php

Let me know any questions!

Thanks,

Daniel
Technical Lead
interactivetools.com