How does one automatically update year-dates via HTML (in modules, footer, etc)?
cemsdb Hi
Which module are you referring to?
With copyright info in the footer, the year will be auto replaced by the current year already.
saguaros It could be any custom module which that feature could be needed.
cemsdb Not sure which code you're using, you can try using this script in custom HTML module to show the current year:
<script> var currentDate = new Date(); var currentYear = currentDate.getFullYear(); document.write(currentYear); </script>
saguaros I pressume one should add your suggested code via 'Source code' on a custom-module (WYSIWYG editor), but when I do so it dissappears the moment I click 'Ok' and leave 'Source code'. What am I doing wrong?
cemsdb The default editor often strips HTML tag like this script tag, you can temporarily disable editor in global configuration and edit module first.
And enable it later.
saguaros Thank you!
Curious, do you have any suggestions on free editors that don't strip HTML script tags (to prevent having to disable/enable default editor in similar scenarios)?
cemsdb You can go to plugin of editor which has options to set list of HTML tags as valid or prohibited elements.