2017-01-08 07:54
浏览 83


Spent a while searching and couldn't find any answers. Really simple question I hope.

In my database I have a string column dayOfWeek.

I use this to track what day of week weekly events are scheduled for. Usually I match the dayOfWeek to the current day using PHP and display the correct events.

What I want to do is show a calendar into the future which makes a list of the future dates of the weekly recurring event.

For example, if the event takes place on Tuesday, and Feb 2017 has Tuesdays on the 7th, 14th, 21st, and 28th. I'd like to use PHP to display as such.

I know strtotime() is used to do the opposite, find a day from the date, but can the opposite be done easily?

Sorry if my question is poorly worded or missing information.

图片转代码服务由CSDN问答提供 功能建议

花了一段时间搜索,找不到任何答案。 我希望这个问题真的很简单。


我用它来跟踪每周活动安排的星期几。 通常我使用PHP将dayOfWeek与当天匹配并显示正确的事件。

我想要做的是显示未来的日历,列出未来的日期。 每周一次的重复活动。

例如,如果活动在周二举行,2017年2月将在周二的7日,14日,21日和28日举行。 我想使用PHP来显示。



  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

3条回答 默认 最新

相关推荐 更多相似问题