Class: WhichDay::Which

Inherits:
Object
  • Object
show all
Defined in:
lib/which_day.rb

Class Method Summary collapse

Class Method Details

.sayObject



5
6
7
8
9
10
# File 'lib/which_day.rb', line 5

def self.say
  now = Time.now
  end_of_year = Time.new(now.year, 12,28)
  last_day_of_year = Time.new(now.year, 12, 31)
  puts "#{now.year}年 周(#{now.strftime('%U')}/#{end_of_year.strftime('%U')}) 天(#{now.strftime('%j')}/#{last_day_of_year.strftime('%j')})"
end