如何更改本周日历的开始日期?
我试图在我的网站中实现日历,我使用以下代码: http://www.yiiframework.com/forum/index.php?/topic/3889-free-form-calendar-application/ 主要代码在第二篇文章中。但问题是,一周从周日开始,我需要将其更改为周一,但我不知道该怎么做。需要一点帮助!:)
im trying to implement a calendar in my website, im using code from: http://www.yiiframework.com/forum/index.php?/topic/3889-free-form-calendar-application/ The main code is in the second post. But the thing is that the week starts on sunday and i need to change it to monday and i can't figure out how to do that. A little help is needed!:)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我以前没有使用过这个类,但是阅读源代码我看到这一行:
初始化变量
headings
,其内容在整个程序中没有被修改,它们只是打印到HTML字符串(变量calendar
) 和implode
。此类还缺少构造函数的参数来告诉它用户需要以星期一(或任何其他日期)作为一周的第一天的输出...
如果您想修改此类以实现该功能,您应该这样做:
headings
变量完成implode
的行周围进行更改。running_day
。I haven't used that class before, but reading the source code I see this line:
initializing the variable
headings
whose contents are not modified in the whole program, and they are simply printed to the HTML string (variablecalendar
) with animplode
.This class also lacks a parameter for the constructor to tell it that the user needs the output with Monday (or any other day) as the first day of the week...
If you want to modify this class in order to implement that functionality, you should do:
implode
over theheadings
variable is done.running_day
.