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:

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

Popular posts from this blog

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

Android M doze mode and "native" posix socket freezing up -