lib/merch_calendar/util.rb in merch_calendar-0.0.4 vs lib/merch_calendar/util.rb in merch_calendar-0.0.5.rc1
- old
+ new
@@ -1,9 +1,31 @@
module MerchCalendar
# Utility methods for the merch calendar
module Util
+ # The start date of the week
+ #
+ # @param year [Fixnum] the merch year
+ # @param month [Fixnum] an integer specifying the julian month.
+ # @param month [Fixnum] an integer specifying the merch week.
+ #
+ # @return [Date] the starting date of the specified week
+ def start_of_week(year, month, week)
+ date_calc.start_of_week(year, month, week)
+ end
+
+ # The end date of the week
+ #
+ # @param year [Fixnum] the merch year
+ # @param month [Fixnum] an integer specifying the julian month.
+ # @param month [Fixnum] an integer specifying the merch week.
+ #
+ # @return [Date] the ending date of the specified week
+ def end_of_week(year, month, week)
+ date_calc.end_of_week(year, month, week)
+ end
+
# The start date of the month
#
# @example
# # The following are all equivalent, and refer to May 2015
# MerchCalendar.start_of_month(2015, 5)