Linux 软件免费装

Dynamic Dates

开发者 jasonhendriks
更新时间 2015年5月9日 19:14
PHP版本: 2.7 及以上
WordPress版本: 4.1.1
版权: GPLv2 or later
版权网址: 版权信息

标签

time date formatting dynamic dates calculator format times formatter

下载

1.0.0 1.0.1 2.0 2.0.1 2.0.2 2.0.3

详情介绍:

Calculates dates and relative dates dynamically in your posts and pages. For example:
Our church's next service is on Mar 21/15 [date format="M d/Y" time="this Sunday"]
Add an always up-to-date copyright notice, or the date of your next monthly poker game. See examples on my website. See the FAQ for instructions on use. * What's New for v2 * Requirements

安装:

  1. Download Dynamic Dates
  2. Unzip and upload the resulting folder to the '/wp-content/plugins/' directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Place a Dynamic Date shortcode in your posts and/or pages. A theme template function call is also available.

屏幕截图:

  • Dynamic Dates running at [jasonhendriks.com](http://www.jasonhendriks.com/programmer/dynamic-dates/dynamic-dates-examples/)

升级注意事项:

2.0.3 Stop clogging outfile with debug statements. Bug fixes. 2.0.2 Fixed the error that presents in some environment "Unknown or bad timezone" 2.0.1 Fix name collision issues with other plugins. 2.0 The first major update in nearly four years! Now with timezone and language support. 1.0.1 A superficial update to re-list Dynamic Dates in the WordPress plugin directory 1.0.0 The first version. Yay!

常见问题:

How does it work?

Dynamic Dates uses PHP's strtotime() function to parse natural language into relative timestamps. For example, two years from now is "+2 year" and Canadian Thanksgiving is the "second monday of october" . Browse the full strtotime() reference to find other possibilities.

How can I display a simple date?

Use one of the built-in shortcodes:

[now], [yesterday], [today], [tomorrow], [last-month], [this-month], [next-month], [last-year], [this-year], [next-year]
See live examples at my website.

How can I display a customized date?

This is a very powerful feature. Use any shortcode, or the generic [date] shortcode, and extend it with the following attributes, each of which is optional:

  • format - a pattern to format the date or time. Browse the different formatting codes for English mode and International mode.
  • time - the date or time specified with natural language
  • relative_to - a date or time that the first time is "relative to", also specified with natural language
  • timezone - a timezone to display (the default is set in the WordPress settings (requires PHP 5.2 or higher)
  • language - a language to use (requires PHP 5.3 or higher)
'English Mode' advanced examples:
It’s Sunday 15:58:47 in Paris, France [date format="l H:i:s" timezone="Europe/Paris"] Canadian Thanksgiving is October 12th this year and October 10th next year [date format="F jS" time="second monday of october"] [date format="F jS" time="second monday of october" relative_to="next year"]
'International Mode' advanced examples:
Voy a la fiesta el viernes 22 de marzo `[date format="d de MMMM" "time="friday" language="es_CL"]`
See live examples at my website.

更新日志:

2.0.3 - 2015-03-20 2.0.2 - 2015-01-28 2.0.1 - 2015-01-27 2.0 - 2015-01-25 1.0.1 - 2015-01-23 1.0.0 - 2011-05-03