docs: function period() {
    var startDate = null;
    var endDate   = null;
  
    switch(arguments.length) {
    case 0:
      throw new Error('period must have at least the start datetime');
    case 1:
      startDate = arguments[0];
      break;
    case 2:
      startDate = arguments[0];
      endDate   = arguments[1];
      break;
    default:
      throw new Error('period with too many arguments: '+arguments.join(', '));
    }
  
    return new PeriodDef(startDate, endDate);
  }