DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:datefilter

This is an old revision of the document!


Datefilter

Compatible with DokuWiki

2006-11-06

plugin Removes lines with dates in the past

Last updated on
2006-11-23
Provides
Syntax

The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on dokuwiki.org. Recommended are public repository hosts like GitHub, GitLab or Bitbucket.

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with calendar, date, filter

Description

Datefilter filters lines which are in the past. The date is recognized with a simple configureable pattern (e.g. yy-mm-dd). The first found date in the line is deciding. You can have a default pattern and/or specify it at every datefilter. As a result you can realize a simple calendar. The syntax can be localized - completely. English and German is available.

Thanks to ...

Andreas and Esther for the work they are doing and especially for trying to help others.

Syntax

Simply add around your table with all your dates. Optional you can add a specific dateformat.

<datefilter>
...
</datefilter>
<datefilter dateformat>
...
</datefilter>

Year, month and date must be specified with two letters! If you want to use four digits for the year you should have a look at the examples.

English version (default installation)

<datefilter>
^date^business appointment^
|06-11-20|DokuWiki presentation|
|06-11-21|DokuWiki training course|
</datefilter>

Here is the default English filter (yy-mm-dd) used. The result on 06-11-21 is:

datebusiness appointment
06-11-21DokuWiki training course
<datefilter 20yy/mm/dd>
^date^business appointment^
|2006/11/20|DokuWiki presentation|
|2006/11/21|DokuWiki training course|
</datefilter>

Result on 06-11-21:

datebusiness appointment
2006/11/21DokuWiki training course

German version (default installation)

<datumfilter>
^Datum^Geschäftstermin^
|20.11.06|DokuWiki Präsentation|
|21.11.06|DokuWiki Schulung|
</datumfilter>

Ergebnis am 21.11.06

DatumGeschäftstermin
21.11.06DokuWiki Schulung
<datumfilter tt.mm.20jj>
^Datum^Geschäftstermin^
|20.11.2006|DokuWiki Präsentation|
|21.11.2006|DokuWiki Schulung|
</datumfilter>

Ergebnis am 21.11.06

DatumGeschäftstermin
21.11.2006DokuWiki Schulung

Localisation

$lang['kwpattern'] = 'datumfilter'; // define the wiki syntax keyword
$lang['default']   = 'tt.mm.jj';    // default pattern if none is specified
$lang['day']       = 't';           // short: day
$lang['month']     = 'm';           // short: month
$lang['year']      = 'j';           // short: year

Download / Installation

Install the current release with the plugin manager. Have a look at the DokuWiki plugin configuration.

Change History

2006-11-23

  • And again a second public release in a few days - Mea culpa! :-)
  • Only improved regular expressions - e.g. day changed from [0-9][0-9] to ((0[1-9])|([1-2][0-9])|(3[0-1])) - no need for an update if you have no problems

2006-11-20

  • First public release
  • All desired features of the author are implemented

License

This product is released under the GPL 2

Discussion

plugin/datefilter.1230934143.txt.gz · Last modified: 2010-06-17 09:39 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki