Timely Greeting Plugin

TimelyGreetingPlugin (or '~TimelyGreeting' in use) is a NeWikiPlugin 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:

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

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}]
Good morning!
[{TimelyGreeting verbose='yes' timezone='PDT'}]
Good morning!

...and with some additional styling, such as might be at the top of a page:

%%(font-size:xx-large;color:#008000)
[{TimelyGreeting morning='おはようございます。' afternoon='こんにちは!' night='こんばんは。'}]
%%
おはようございます。