On Fri, Jan 29, 2021 at 10:01:32AM +0800, Lin Jiaxin wrote:
def update_new_refs_count(new_refs_count)
- t = Time.now
- year = t.year.to_s
- month = t.month.to_s
- day = t.day.to_s
- t = Time.now.to_s
- # example: 2021-01-28
- day = t[0..9]
- # example: 2021-01
- month = t[0..6]
- # example: 2021
- year = t[0..3]
t = Time.now day = t.strftime('%Y-%m-%d') month = t.strftime('%Y-%m') year = t.strftime('%Y')
It looks good
Thanks, Yuanchao