TimelyGreetingPlugin (or 'TimelyGreeting' in use) is a CeryleWikiPlugin that returns a timely greeting based on either server time or a provided timezone.

Generates a "Good morning!", "Good afternoon!", "Good evening!", or "Good night!" depending on the current time at the timezone of the server or a provided timezone. If the provided timezone cannot be understood, returns a string based on GMT.

While subjective, the time boundaries used by this plugin are:

  • Morning: 3am until 12am (0300-1159)
  • Afternoon: 12pm until 6pm (1200-1759)
  • Evening: 6pm until 9pm (1800-2059)
  • Night: 9pm until 3am (2100-0259)

This plugin is still relatively untested across time zones. Any bugs, please report to MurrayAltheim.

Parameters#

timezone = 'tzid'
set the timezone to the provided string. The default will be the timezone of the server
verbose = 'yes' | 'no'
also show time and timezone
format = 'short' | 'medium' | 'long'
when in verbose mode, selects the format used for display of the time
morning = 'phrase'
set the "Good morning!" string to the provided value
afternoon = 'phrase'
set the "Good afternoon!" string to the provided value
evening = 'phrase'
set the "Good evening!" string to the provided value
night = 'phrase'
set the "Good night!" string to the provided value (because in English "Good night" is considered a good-bye, the default might need to be altered).

Distribution#

This is distributed here as code only. There is a dependency on org.ceryle.wiki.plugin.util.ParamUtil, which is included. Please note that the distribution attached to this page may not be the most current: see the CeryleWiki for the most recent distribution of the code.

Examples#

[{TimelyGreeting}]

[{TimelyGreeting verbose='yes' timezone='PDT'}]

[{TimelyGreeting afternoon='こんにちは!'}]

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
gz
TimelyGreetingPlugin-20070710.... 3.5 kB 1 10-Jul-2007 08:32 MurrayAltheim distribution of 10 July 2007
« This page (revision-5) was last changed on 06-Dec-2007 13:01 by JanneJalkanen