dokuwiki-plugin-struct
dokuwiki-plugin-struct copied to clipboard
Time type
Right now there is a Date and a DateTime type in the struct plugin. For a more complex event calendar it would be nice to also have a Time type that uses the time input form of HTML5.
Should Time inherit from Date like DateTime does? Or should Date and Time have a shared abstract base class? Or should we have just DateTime as most general timestamp type and derive restricted types like Date and Time from that? The latter probably boils down to configuration options of DateTime's config variable.
I also noticed, that DateTime implements select() filter() and sort() but Date does not. This also feels like a common feature for both. The Value class has separate variables for the display and compare value. However, the Date and DateTime types don't provide these. What should the development direction be?
I guess it would make most sense to only have DateTime and use configuration to restrict it to Date or Time only. Similar on how the Integer type was made obsolete by a configured Decimal type.