setName('hello') ->setDescription('the hello command'); } protected function execute(Input $input, Output $output) { // var_dump($input); // var_dump($output); $result=date("Y-m-d", strtotime("-1 month", strtotime("2017-03-31"))); // 指令输出 $output->writeln($result); } }