[html-formfu] date element incompatible changes

Carl Franks fireartist at gmail.com
Tue Aug 14 10:50:27 GMT 2007


For anyone using the date element from svn - take note that I've
changed several method names.

Instead of having seperate methods for things like day_default(),
month_default(), etc.
There are now 3 methods - day(), month() and year() which each accept a hashref.

So, the following old yaml config:

    type: date
    day_default: 1
    day_prefix: ['day']
    month_default: 1
    month_prefix: ['month']

would now be:

    type: date
    day:
      default: 1
      prefix: ['day']
    month:
      default: 1
      prefix: ['month']

Following is a full list of changes:
( old ... new )

day_name ... day->{name}
day_default ... day->{default}
day_prefix ... day->{prefix}

month_name ... month->{name}
month_default ... month->{default}
month_prefix ... month->{prefix}
months ... month->{names}
short_months ... month->{short_names}

year_name ... year->{name}
year_default ... year->{default}
year_prefix ... year->{prefix}
years ... year->{list}
year ... year->{reference}
year_less ... year->{less}
year_plus ... year->{plus}

Any suggestions for an improvement of the name year->{reference} welcome ;)

Now that I've made these changes - I'll get on with the easier task of
adding the requested changes.

Carl



More information about the HTML-FormFu mailing list