2012-07-18 Modify meta forms

I think the navibar should be changed in some meta navigation, e.g. Wiki, Blog, Ticket etc. The default is somehow not suitable. Even a cleared one is may be better

Format for PTIME

About time format YYYY-MM-DD HH:MM:SS for PTIME: I use flatland's DateTime class and it was difficult for me to specify the right regex for Temporal class to accept also prefixes of the full format http://dag-flatland.readthedocs.org/en/latest/schema/datetimes/. It is used the following regex and format in DateTime and Time classes.

DateTime:

507     regex = re.compile(
508         ur'^(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2}) '
509         ur'(?P<hour>\d{2}):(?P<minute>\d{2}):(?P<second>\d{2})$')
510     format = (u'%(year)04i-%(month)02i-%(day)02i '
511               u'%(hour)02i:%(minute)02i:%(second)02i')
512     used = (u'year', u'month', u'day', u'hour', u'minute', u'second')

Date:

523     regex = re.compile(
524         ur'^(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})$')
525     format = u'%(year)04i-%(month)02i-%(day)02i'
526     used = (u'year', u'month', u'day')

Is there a way to assign 'hour' to some value if it is not matched?

ur'^(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2}) (?P<hour>\d{2})?$'

Btw, later PTIME could be assigned using some JS calendar widgets. For instance: http://tardate.blogspot.com/2010/06/quick-survey-of-jquery-datetime-widgets.html

Have you looked at the implementation of Flask-Babel#Formatting Dates? Yes, it deals only with the date representation but not with date parsing. I will see if I could use flatland's Compound class for that Flatland Compound

Publish time widgets in other blog engines

Livejournal

http://box.psviderski.name/share/moin2/livejournal-date.png

Wordpress

Immediately http://box.psviderski.name/share/moin2/wordpress-date-immediately.png 'Edit' button pressed http://box.psviderski.name/share/moin2/wordpress-date.png

MoinMoin: GoogleSoc2012/WikiBlog/2012-07-18 (last edited 2012-07-20 21:05:03 by 134)