From: Phano Date: 2004-07-30T17:36:43+09:00 Subject: Time checking, efficient? --- copy --- module Strict class StrictError < Exception end class TimeCheck < Time def TimeCheck.gm( *args ) month = args[1] || 1 time = Time.gm( *args ) raise StrictError.new('Days out of range') if time.month != month time end end end --- end --- I want to check if a Time is in the right boundraries more strictly than the Time class already does. Time.gm( 2004,2,30 ) -> Mon Mar 01 00:00:00 UTC 2004 Time*Check.gm( 2004,2,30 ) -> StrictError Would the above module be efficient or could this be done in another way?