Top Level Namespace
Defined Under Namespace
Modules: Authenticator, Birth, MagisterData, Official Classes: ClassRoom, Grade, MagClass, Magister, Person, Profile, Subject, Teacher
Instance Method Summary collapse
-
#validate_date(date) ⇒ Boolean
Validates a date.
Instance Method Details
#validate_date(date) ⇒ Boolean
Validates a date
13 14 15 16 17 18 19 |
# File 'lib/magister/data.rb', line 13 def validate_date(date) format = '%Y-%m-%d' DateTime.strptime(date, format) true rescue ArgumentError false end |