Get the App
SLTechnology News&Howtos  ›  Servers  › 

The way to weave a dream and change the time label to "today, tomorrow, the day after tomorrow"

Shulou Source: shulou.com Published: 2022-06-02 05:01:51 09月30日 Update

The editor would like to share with you the method of weaving a dream to change the time label to "today, tomorrow, the day after tomorrow". I hope you will learn a lot after reading this article. Let's discuss it together.

Dream weaving how to change the time label to "today, tomorrow, the day after tomorrow"?

Dream-weaving DEDECMS changes the time tag to "today, tomorrow, the day after tomorrow"

Recommended study: dream weaving cms

[field:senddate runphp='yes'] $ntime = time (); $oneday = 3600 * 24; $twoday = 3600 * 48; $threeday = 3600 * 72; if ($ntime-@ me) < $oneday) @ me= "Today"; elseif (($ntime-@ me) < $twoday) @ me= "yesterday"; elseif (($ntime-@ me) < $threeday) @ me= "the day before yesterday"; else @ me=MyDate ('MMI dudes) [/ field:senddate] [field:senddate function=MyDate ('Hlypher slots) /]

The above paragraph is the realization date, if it is today, it shows today, and yesterday shows yesterday. With the time tag below, you can achieve the effect of "11:41 today". When the post time is not within three days, it shows the time and date, like this "05-24 11:41". The pubdate field also applies.

After reading this article, I believe you have a certain understanding of the method of weaving dreams to change the time label to "today, tomorrow, the day after tomorrow". If you want to know more about it, welcome to follow the industry information channel, thank you for your reading!

Tags: Time label method date article field finished effect article more knowledge industry information information channel face channel learning recommendation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information macOS MySQL Redmi NVidia