Hello,
How can I show the date in this format: day (number) + "de" + month (name) + "de" + year
In Spanish, 5 February 2017 is 5 de febrero de 2017. I tried adding de to j F Y but obviously it didn't work . How can do it?
Regards.
Hello,
How can I show the date in this format: day (number) + "de" + month (name) + "de" + year
In Spanish, 5 February 2017 is 5 de febrero de 2017. I tried adding de to j F Y but obviously it didn't work . How can do it?
Regards.
The date pattern uses regular characters for replacement (that's how PHP's date system works), as such you'll need to manually escape characters that are meant literally: j \d\e F \d\e Y. The backspace prevents the replacement and causes the following character to be output "as-is".
Thank you, I had only escaped this way: \de, and obviously that didn't work.
Apart from CSS, is there another way to display the name of the month in lowercase? In Spanish, the days and months should not be capitalized unless they are used as proper nouns, in the beginning of the sentence, or after period. For a normal date is a grammatical error to capitalize them.
Regards.
The month names are taken straight from your phrases, but I guess making them lower-case is breaking things in some other places. The easiest approach is CSS indeed, the following snippet should do the job:
The selector will not change the case for any other languages except for es (replace with your language code if it differs) and only affects places that display the dynamic date. This should have the desired effect, without having an influence on any other part.
Thank you, I feel so stupid , I had completely forgotten about using the language selector, I had used only the time.datetime but obviously that made the months lowercase when English was active.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!