Module: FinnishHolidays

Defined in:
lib/finnish-holidays.rb,
lib/finnish-holidays/cli.rb,
lib/finnish-holidays/version.rb,
lib/finnish-holidays/translate.rb,
lib/finnish-holidays/date_utils.rb,
lib/finnish-holidays/classes/year.rb,
lib/finnish-holidays/classes/calendar.rb

Defined Under Namespace

Modules: CLI, Translate Classes: Calendar, DateUtils, Year

Constant Summary collapse

VERSION =
'0.3.4'

Class Method Summary collapse

Class Method Details

.month(month, year, include_weekends = false) ⇒ Object

Lists holidays for the given month (and year)



15
16
17
# File 'lib/finnish-holidays.rb', line 15

def self.month(month, year, include_weekends = false)
  FinnishHolidays::Calendar.new(year, month, 1).month(month, year, include_weekends)
end

.next(count = 3, include_weekends = false) ⇒ Object

Lists the next holidays relative to today’s date



5
6
7
# File 'lib/finnish-holidays.rb', line 5

def self.next(count = 3, include_weekends = false)
  Calendar.new.next(count, include_weekends)
end

.year(year, include_weekends = false) ⇒ Object

Lists holidays for the given year



10
11
12
# File 'lib/finnish-holidays.rb', line 10

def self.year(year, include_weekends = false)
  FinnishHolidays::Calendar.new(year, 1, 1).year(year, include_weekends)
end