Rails 3 查找星期几 [英] Rails 3 Finding day of week

查看:42
本文介绍了Rails 3 查找星期几的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作自己的日历,因为我似乎无法获得有关事件日历的任何帮助,所以我想做的是显示星期几,即 .. 2011 年 1 月 1 日是星期六,是否有一个简单的命令得到那一天还是我需要别的东西

I'm trying to make my own calendar because i cant seem to get any help with event calendar so what im trying to do is Display the day of the week ie.. January 1 2011 is a Saturday is there an easy command to get that day or do i need something else

推荐答案

你不能使用 time.wday,0 = 星期日等等

Can't you use time.wday, 0 = sunday and so on

这篇关于Rails 3 查找星期几的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆