


A complete list of date formatting forms called by dedecms, dedecms date format_PHP tutorial
A complete list of dedecms call date formats, dedecms date format
I remember when I first learned dedecms, I had a headache for a long time about the date of the call article. Today’s editor is dedicated to I have collected and compiled an article about dedecms date formatting, I hope it will be helpful to everyone
dedecms’ unique and commonly used date formatting function MyDate()
代码:[field:pubdate function="MyDate('Y-m-d',@me)" /] | 样式:2013-08-07 |
代码:[field:pubdate function="MyDate('m-d',@me)" /] | 样式:08-07 |
代码:[field:pubdate function="MyDate('Y-m-d H:i:s',@me)" /] | 样式:2013-08-07 09:14:38 |
The above three date formats are often used when we make websites. If you want to set the date more personalizedly, you can continue to read below
dedecms uses PHP’s own date formatting function strftime()
代码:[field:pubdate runphp='yes']@me = str_replace('-', '', strftime("%Y年-%m月-%d日 %H:%M:%S", @me));[/field:pubdate] | 样式:2013年08月07日 09:14:38 |
Note: The above codes are all called in arclist on the home page list page. If the content is called, please switch it yourself, such as:
{dede:field.pubdate function="MyDate('Y-m-d',@me)"/}
In addition, [field:pubdate function='strftime("%Y year %m month %d day %H point %M minute %S second",@me)'/] written in most online tutorials can be called The date is in the form of August 7, 2013..., but Aniu tried it but it didn't work. Except for the first %Y, all the following ones will be parsed and processed as ordinary strings, and Chinese characters will be added after %S. It is no longer displayed. I hope friends who know can tell A Niu about Q27856361,
The specific meanings of the English letters after the percent sign (%) are as follows, (tips world WWW.QMTX3.COM) You can freely combine a time format of your own
%a abbreviation for day of the week
%A The full name of the day of the week
Abbreviation for %b month
%B The full name of the month
%c standard date time string
%C The last two digits of the year
%d The day of the month in decimal format
%D month/day/year
%e In a two-character field, the day of the month in decimal
%F Year-Month-Day
%g Last two digits of year, using week-based year
%G year, using week-based year
%h abbreviated month name
%H hour in 24-hour format
%I hour in 12-hour clock
%j The day of the year in decimal notation
%m month in decimal
%M Minutes in ten-hour format
%n newline character
%p local AM or PM equivalent display
%r 12 hours time
%R Display hours and minutes: hh:mm
%S decimal seconds
%t horizontal tab
%T Display hours, minutes and seconds: hh:mm:ss
%u The day of the week, Monday is the first day (values range from 0 to 6, Monday is 0)
%U The week number of the year, with Sunday as the first day (value from 0 to 53)
%V Week number of the year, using week-based year
%w Day of the week in decimal (values from 0 to 6, Sunday is 0)
%W The week number of the year, with Monday as the first day (value from 0 to 53)
%x standard date string
%X standard time string
%y decimal year without century (values from 0 to 99)
%Y decimal year with century part
%z, %Z time zone name, if the time zone name cannot be obtained, an empty character is returned.
In fact, the above time formats are rarely used. At least I have not used dedecms for several years. It has always been 2013-08-07 or 08-07. This is also the dedecms date format. The most commonly used form
I can’t see what effect you want based on the description, so let’s talk briefly. 19:May in the picture is H:M in the label. You might as well modify it according to dede’s label description, which is very detailed help.dedecms.com/v53/
pubdate is the time when the article was published, and of course it will not change

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

Dedecms is an open source Chinese CMS system that provides content management, template system and security protection. The specific usage includes the following steps: 1. Install Dedecms. 2. Configure the database. 3. Log in to the management interface. 4. Create content. 5. Set up the template. 6. Manage users. 7. Maintain the system.

Accurate and reliable dedecms conversion tool evaluation report With the rapid development of the Internet era, website construction has become one of the necessary tools for many companies and individuals. In website construction, using a content management system (CMS) can manage website content and functions more conveniently and efficiently. Among them, dedecms, as a well-known CMS system, is widely used in various website construction projects. However, sometimes we are faced with the need to convert the dedecms website to other formats, in which case we need to use a conversion tool

How to upload local videos using Dedecms? Prepare the video file in a format that is supported by Dedecms. Log in to the Dedecms management backend and create a new video category. Upload video files on the video management page, fill in the relevant information and select the video category. To embed a video while editing an article, enter the file name of the uploaded video and adjust its dimensions.

Template replacement can be implemented in Dedecms through the following steps: modify the global.cfg file and set the required language pack. Modify the taglib.inc.php hook file and add support for language suffix template files. Create a new template file with a language suffix and modify the required content. Clear Dedecms cache.

Learning dedecms encoding conversion function is not complicated. Simple code examples can help you quickly master this skill. In dedecms, the encoding conversion function is usually used to deal with problems such as Chinese garbled characters and special characters to ensure the normal operation of the system and the accuracy of data. The following will introduce in detail how to use the encoding conversion function of dedecms, allowing you to easily cope with various encoding-related needs. 1.UTF-8 to GBK In dedecms, if you need to convert UTF-8 encoded string to G

DedeCMS is an open source content management system that has some potential vulnerabilities and security risks: 1. SQL injection vulnerability. Attackers can perform unauthorized operations or obtain sensitive data by constructing malicious SQL query statements; 2. File Upload vulnerability, attackers can upload files containing malicious code to the server to execute arbitrary code or obtain server permissions; 3. Sensitive information leakage; 4. Unauthenticated vulnerability exploitation.

dedecms is an open source PHP content management system, specially designed for Chinese websites, with the following functions and features: User-friendly interface Powerful editor Flexible template system Multi-language support Built-in search engine optimization (SEO) Powerful user management system The advantages of the plug-in system dedecms include open source and free, high scalability, active community, easy to use and highly customizable.
