|
|
Forum moderator: bigblog |
uCoz Community Communication uCoz Discussions What's the code for Modified Date? |
What's the code for Modified Date? |
hi uCoz, if there's a code for date of addition ($ADD_DATE$), what's the code for the date modified?
Date modified is very important for the Schema Mark-up to provide snippets to search engine. Post edited by khen - Monday, 2018-03-19, 4:41 PM
|
The value between the < lastmod>< /lastmod> tags is updated every time the site map is regenerated and sets the date and time of the regeneration script execution there in the format necessary for search robots, for example: the module Installation is installed as usual, through the standard add-on installer in the admin area. Copy the module code into a text file called lastmod..xml and save, load it into the installer through the admin panel and update the modifier cache after installation
Added (2018-04-07, 9:31 PM) it is used in scripts to check whether the current document should be reloaded or not. we will get high speed site indexing and low load on the server, but this is only if everything is correctly configured Attachments:
5789600.jpg
(19.8 Kb)
Post edited by ket311288vry - Saturday, 2018-04-07, 9:23 PM
|
It is possible via JavaScript.
Code <script type="text/javascript"> const modDate = new Date($LASTMOD$ * 1000) const modYear = modDate.getFullYear(), modMonth = modDate.getMonth(), modDay = modDate.getDay() let modHr = modDate.getHours(), modMin = modDate.getMinutes() if (modHr.toString().length < 2) modHr = '0' + modHr if (modMin.toString().length < 2) modMin = '0' + modMin document.write(`${modMonth}/${modDay}/${modYear} ${modHr}:${modMin}`) </script> hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau sometimes i lurk here |
Attachments:
5109592.png
(125.3 Kb)
Proud Ucoz Member Since 2013
Warning: Do not trust Zayaan Ibrahim with projects, he will scam you by overpricing! ♥ http://rawtrex.com/ ♥ Post edited by Elexy - Monday, 2018-04-09, 8:35 PM
|
| |||
| |||