• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » Communication » uCoz Discussions » What's the code for Modified Date?
What's the code for Modified Date?
khen
Posts: 466
Reputation: 13

Message # 1 | 4:39 PM
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
Gromov
Posts: 419
Reputation: 12

Message # 2 | 2:00 PM
Hello khen,

The 'Update entry editing date' option changes the editing date, it displays the result from the $LASTMOD$ (timestamp of last entry modification) variable.
khen
Posts: 466
Reputation: 13

Message # 3 | 5:19 AM
Gromov, how to format that into a real date (e.g. March 22, 2018)?
Gromov
Posts: 419
Reputation: 12

Message # 4 | 9:43 AM
khen, it's not possible to modify it, sorry.
khen
Posts: 466
Reputation: 13

Message # 5 | 9:44 AM
Gromov
Posts: 419
Reputation: 12

Message # 6 | 12:37 PM
khen, yes
khen
Posts: 466
Reputation: 13

Message # 7 | 12:40 PM
What's the use of the $LASTMOD$ if it's not readable by humans?
Gromov
Posts: 419
Reputation: 12

Message # 8 | 12:53 PM
khen, it's not a question I can answer, unfortunately. You can always ask the manager in charge of the VIP users if they can assist you with this one. It'll be the best solution for you.
ket311288vry
Posts: 5
Reputation: 0

Message # 9 | 9:31 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)
---------------------------------------------

Quote khen ()
Какая польза от $ LASTMOD $,


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
bigblog
Twink
Posts: 1537
Reputation: 72

Message # 10 | 5:03 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'm a twink, please enjoy your stay

i do not work for the company anymore, sorry for the late replies
icon by Nathan Butler
Elexy
Posts: 93
Reputation: 2

Message # 11 | 7:56 PM
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
bigblog
Twink
Posts: 1537
Reputation: 72

Message # 12 | 7:58 PM
goodness gracious
hey i'm joe and i'm a twink, please enjoy your stay

i do not work for the company anymore, sorry for the late replies
icon by Nathan Butler
khen
Posts: 466
Reputation: 13

Message # 13 | 11:37 PM
bigblog, thanks for the suggestion. cool
uCoz Community » Communication » uCoz Discussions » What's the code for Modified Date?
  • Page 1 of 1
  • 1
Search: