We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I had a small question about the code and you seem knowledgable on the matter! I tried this by myself before looking at the comments and did mine along the lines of:
hh=hh%12;if(strcmp(t12,"PM")==0){hh+=12;}
But everyone here seems to be using if/elses to treat 12 as a special case. Is there any performance benefit to doing so?
Time Conversion
You are viewing a single comment's thread. Return to all comments →
Hi,
I had a small question about the code and you seem knowledgable on the matter! I tried this by myself before looking at the comments and did mine along the lines of:
But everyone here seems to be using if/elses to treat 12 as a special case. Is there any performance benefit to doing so?
Thanks :)