This project is archived and is in readonly mode.

#33 ✓resolved
Scott Kyle

Date.set() doesn't take object

Reported by Scott Kyle | April 14th, 2009 @ 10:20 PM

This is more of a request. I think it would be nice if Date.set() could take a properties object just like Element.set(). The side effect of this would be that parsePatterns would look cleaner as well.

set: function(prop, value){
    switch ($type(prop)){
        case 'object':
            for (var p in prop) this.set(p, prop[p]);
        case 'string':
            prop = prop.toLowerCase();
            var m = Date.Methods;
            if (m.has(prop)) this['set' + m.get(prop)](value);
    return this;

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket