__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:

* ''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 [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|http://purl.org/ceryle/wiki/] for the most recent distribution of the code.


! Examples

{{{
[{TimelyGreeting}]
}}}
[{TimelyGreeting}]

----

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

----

...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='こんばんは。'}]
%%
}}}
%%(text-align:center;font-size:xx-large;color:#008000)
[{TimelyGreeting morning='おはようございます。' afternoon='こんにちは!' night='こんばんは。'}]
%%