how to parse a time in Ruby which takes a string in HH:MM and calculate seconds into the day -
this question has answer here:
- ruby: convert time seconds? 6 answers
i have method takes string in hh:mm format , should calculate how many seconds day is
time.strptime(mystring, "%h:%m") - time.now.beginning_of_day
Comments
Post a Comment