定制 jjpmann/ee-dt 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jjpmann/ee-dt

Composer 安装命令:

composer require jjpmann/ee-dt

包简介

The DT Plugin displays dates with formatting and allows you to add days, months, years to the current date or a static date you set.

README 文档

README

Date/Time plugin for ExpressionEngine

The DT Plugin displays dates with formatting and allows you to add days, months, years to the current date or a static date you set.

Installation

New: composer installer

composer require jjpmann/ee-dt

Read more about this here

Old: manual

move files into 'dt' folder inside of system/user/addons

Usage

{exp:dt}

Will return the date formatted this way: MM/DD/YYYY

{exp:dt:wrap}

Tag pair used to wrap around entries loop to adding custom dates in to parameters

Parameters

All of these are optional

set

Sets the static date that the other parameters will reference. If not set will default to the current date.

{exp:dt set="01/01/2010"}
format

Sets the format of the returned date using the following parameters: http://expressionengine.com/user_guide/templates/date_variable_formatting.html

{exp:dt set="11/03/90" ee_format="true" format="%l %M %j, %Y"}

Outputs: Saturday Nov 3, 1990

ee_format

if set to 'false'dt will parse the date using php formating: http://php.net/manual/en/function.strftime.php

{exp:dt set="11/03/90" format="%A %B %e, %Y"}

Outputs: Saturday November 3, 1990

language

Translates based on system languages

  • fr_FR : French

  • es_ES : Spanish

  • nl_NL : Dutch

    {exp:dt set="11/03/90" language="es_ES" format="%A %b %e, %Y"}

Outputs: sábado noviembre 3, 1990

day

Adds or subtracts a value in days to current/set date.

month

Adds or subtracts a value in months to current/set date.

year

Adds or subtracts a value in years to current/set date.

{exp:dt day="3" month="1" year="-1" set="1/1/2010"}

Outputs: 02/04/09

hour

Adds or subtracts a value in hours to current/set date.

minute

Adds or subtracts a value in minutes to current/set date.

second

Adds or subtracts a value in seconds to current/set date.

Examples

Third Saturday of each month

Now: {current_time format="%m/%d/%y"} <br>

{exp:dt set='third saturday of this month'} == {current_time format="%m/%d/%y"}<br>

{if '{exp:dt set="first monday of this month"}' == '{current_time format="%m/%d/%y"}'}

YAY

{/if}

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固