Guest User

Untitled

a guest
Jun 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. def convert_datetime(hash, date_symbol_or_string)
  2. attribute = date_symbol_or_string.to_s
  3. return DateTime.civil(hash[attribute + '(1i)'].to_i, hash[attribute + '(2i)'].to_i, hash[attribute + '(3i)'].to_i, hash[attribute + '(4i)'].to_i, hash[attribute + '(5i)'].to_i, hash[attribute + '(6i)'].to_i)
  4. end
Add Comment
Please, Sign In to add comment