Sha256: b7bfd05c6772c99991f3db190b7f2cece1de68092cc0520c34adccea092bb923
Contents?: true
Size: 1.36 KB
Versions: 18
Compression:
Stored size: 1.36 KB
Contents
require 'fileutils' def showmonth require 'date' begin # begin rescue monitored block cal_path = File.join( $extras_directory, 'cal' ) require cal_path to = Date.today tempyear ||= to.year tempmonth ||= to.mon if @a_year.to_i > 0 and @a_month.to_i > 1 tempyear = @a_year.to_i tempmonth = @a_month.to_i end tempweekdaystring = " " cal = Cal.new calendardata = cal.print(tempyear,tempmonth) @showcalendartitle = calendardata[0] @showcalendarweektitles = calendardata[1] tempweekdaystring = calendardata[2].tr(' ', '.') @showmonthresult1 = tempweekdaystring tempweekdaystring = calendardata[3].tr(' ', '.') @showmonthresult2 = tempweekdaystring tempweekdaystring = calendardata[4].tr(' ', '.') @showmonthresult3 = tempweekdaystring tempweekdaystring = calendardata[5].tr(' ', '.') @showmonthresult4 = tempweekdaystring tempweekdaystring = calendardata[6].tr(' ', '.') @showmonthresult5 = tempweekdaystring tempweekdaystring = calendardata[7].tr(' ', '.') @showmonthresult6 = tempweekdaystring rescue # process exeption @showmonthresult = "\n" + "error in eval" end # end of rescue process # of rescue monitored block end
Version data entries
18 entries across 18 versions & 3 rubygems