CMS Tutorial
DEDECMS
How to change the time tag in DreamWeaver to 'today, tomorrow, and the day after tomorrow'How to change the time tag in DreamWeaver to 'today, tomorrow, and the day after tomorrow'

How to change the time tag to "today, tomorrow, and the day after tomorrow"?
Dreamweaver DEDECMS changes the time tag to "today, tomorrow, the day after tomorrow"
Recommended study:梦weavercms
[field:senddate runphp='yes'] $ntime = time(); $oneday = 3600 * 24; $twoday = 3600 * 48; $threeday = 3600 * 72; if(($ntime - @me) < $oneday) @me = "今天"; elseif(($ntime - @me) < $twoday) @me = "昨天"; elseif(($ntime - @me) < $threeday) @me = "前天"; else @me=MyDate('m-d',@me); [/field:senddate] [field:senddate function=MyDate('H:s',@me)/]
above A period is the implementation date. If it is today, today will be displayed. Yesterday will be displayed yesterday. With the following period label, the effect of "Today 11:41" can be achieved. When the article is not published within three days Just display the time and date, like this "05-24 11:41". The same applies to the pubdate field.
The above is the detailed content of How to change the time tag in DreamWeaver to 'today, tomorrow, and the day after tomorrow'. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools




