module EcircleTimeHelper
Helper for converting times to ecircle expected format.
Public Instance Methods
ecircle_format(prefix)
click to toggle source
# File lib/ecircle_soap_client.rb, line 18 def ecircle_format(prefix) # ecircle uses JS month indices strftime("yyyy:%Y,dd:%d,hh:%H,min:%M,ss:%S,mm:#{'%02d' % (month - 1)}").split(','). inject({}) do |hsh, postfix_and_value| postfix, value = postfix_and_value.split(':') hsh.merge( "#{prefix}_#{postfix}".to_sym => value ) end end