|
|
1
1
这可以帮助您: http://www.francisfish.com/getting_the_number_of_months_between_two_dates_in_rubyrails.htm 获取月数后,您可以从此处获取月名: months = ["", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] months[start_date.month, number_of_months]
如
编辑:
Date::MONTHNAMES[start_date.month, number_of_months]
编辑:
Date::MONTHNAMES[start_month_num, end_month_num] 但是,如果end-month-num小于start-month-num,这将失败。 这应该有效: if start_month <= end_month Date::MONTHNAMES[start_month..end_month] else Date::MONTHNAMES[end_month..12] + Date::MONTHNAMES[1..start_month] end |
|
|
Bard.Mus · 迁移后的数据库字符集环境 1 年前 |
|
Efannnnnn · 将Id数据存储到任何页面 1 年前 |
|
|
yooooo · 用于在块中删除的存储过程-LOOP未执行 1 年前 |
|
John Beasley · 更新一定数量记录的连续日期 1 年前 |
|
|
ColinM · MySQL以前的结果查询返回不正确的值 1 年前 |
|
Sergey_Z · MySQL只需无条件连接2个表和交叉连接 1 年前 |