【问题标题】:Count months from now从现在开始数月
【发布时间】:2013-01-24 10:08:30
【问题描述】:

我在我的页面上使用Max's Calander。需要使用这种时间格式:Y,n(例如:2008,3)

如何从现在开始生成 12 个月?

我试过了:

$myCelandar->showCalendar(date("Y".","."n"));
$myCelandar->showCalendar(date("Y".","."n", strtotime("+1 month") ));

但它不会起作用。

【问题讨论】:

  • "Y".","."n" O_o 那里发生了什么?应该只是'Y,n'
  • 你得告诉我们谁是 Max?
  • 投反对票,因为您将答案放在您的问题中,只需要更改strtotime 值。

标签: php date calendar


【解决方案1】:
   $myCelandar->showCalendar(date("Y,n", strtotime("+1 year")));

【讨论】:

    猜你喜欢
    • 2014-05-05
    • 2021-06-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多