161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
# File 'lib/functions.rb', line 161
def self.datetime_values_check(year,month,day,hour,minute,second)
if (year.to_i<1900 || year.to_i>=2100)
return false
end
if (month.to_i<1 || month.to_i>12)
return false
end
if (day.to_i<1 || day.to_i>31)
return false
end
if (hour.to_i<0 || hour.to_i>23)
return false
end
if (minute.to_i<0 || minute.to_i>59)
return false
end
if (second.to_i<0 || second.to_i>59)
return false
end
return true
end
|