dtjzpg5313 2016-07-08 17:50
浏览 52

转换/显示日期的最佳方式

I have a php form which requires the user to input a date. I have three check boxes that they can choose from: "today", "tomorrow", and "other" (where other requires them to enter a specific date in the field.

I want "today" to print out the current day, "tomorrow" to print out tomorrow's day/date, and "other" to print out the date they choose. The format should be "Day, Month date" (Friday, July 8).

For today's date it's pretty straight forward, just use the getdate() array, but is there a simple way to get tomorrow's date (without requiring multiple steps/error checking)? And is there a simple way to convert the output of (and is the day of the week stored in the output for type=date)?

  • 写回答

3条回答 默认 最新

  • duanjiao8871 2016-07-08 18:01
    关注
    date('l F\, d', strtotime(' +1 day'));
    
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度