Hours format | WordPress.org

Hello, I have problem with calculator, that it would understand my operation as 24 hour format number.

User selects the number from dropdown (from ’10’ to ’15’, this is an hour on which they start eating breakfast, while doing intermittent fasting) and calculator show intermittent fasting time (16 hours period, while they can’t eat anything)

var result = (fieldname11+8);
var resultt = (fieldname11+16);
var resulttt = CONCATENATE (‘intermittent fasting time is from ‘,result, ‘ hour, to’, resultt, ‘ hour’);

Is there a way to make sure that calculator understands, that answer shouldn’t be up to “24” and if number is bigger, then it should be ’00’ to ’24’ hours?

Thanks in advance 🙂


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer