lib/vpim/date.rb in vpim-0.695 vs lib/vpim/date.rb in vpim-13.11.11

- old
+ new

@@ -1,5 +1,6 @@ +# -*- encoding : utf-8 -*- =begin Copyright (C) 2008 Sam Roberts This library is free software; you can redistribute it and/or modify it under the same terms as the ruby language itself, see the file COPYING for @@ -38,11 +39,11 @@ # Examples: # Date.bywday(2004, 2, Date.str2wday('TU')) => the first Tuesday in # February # Date.bywday(2004, 2, Date.str2wday(2)) => the same day, but notice # that a valid wday integer can be passed right through. - # + # def Date.str2wday(wdaystr) return wdaystr unless wdaystr.respond_to? :to_str str = wdaystr.to_str.upcase if str.length < 2 @@ -54,10 +55,10 @@ return wday if wday raise ArgumentError, 'wday #{wdaystr} was not a recognizable weekday name' end - + # Create a new Date object for the date specified by year +year+, month # +mon+, and day-of-the-week +wday+. # # The nth, +n+, occurrence of +wday+ within the period will be generated # (+n+ defaults to 1). If +n+ is positive, the nth occurrence from the