/** @jsx React.DOM */

window.Day = React.createClass({
  className: function() {
    classNames = ['day'];

    if(this.props.day.isSame(this.props.month, 'month')) {
      classNames.push('this-month');
    }

    if(moment().isSame(this.props.day, 'day')) {
      classNames.push('today');
    }

    return classNames.join(' ');
  },

  render: function() {
    return (
      <div className={this.className()}>{this.props.day.date()}</div>
    );
  }
});

/** @jsx React.DOM */

window.Day = React.createClass({
  render: function() {
    classes = React.addons.classSet({
      'day': true,
      'this-month': this.props.day.isSame(this.props.month, 'month'),
      'today': moment().isSame(this.props.day, 'day')
    });

    return (
      <div className={classes}>{this.props.day.date()}</div>
    );
  }
});

Use React.addons.classSet for class construction
Use React.addons.classSet for class construction
