Question:
In Siman 284 we find that one is not allowed to fast even "one hour" on Shabbos, assuming its "Leshem tanis "(Mb sk 1).
If the intention of fasting "makes" it into a fast (and therefore its forbidden in Shbs), why is there no concept of fasting (on a weekday) for a half day or similar (i.e. Tanis Sha`os) etc. and we only find the nusach of kasbolas tanis (as printed in all sidurim) for a full, entire day.
Answer:
My understanding of the Mishna Berura in 288-1 is that if a person is abstaining from eating even for an hour, because he wants to “fast” that is not permitted on Shabbos because it is still considered paining oneself, even though it is not really considered a “taanis”. A real “fast” as you write is only if it is for a full day.
Best wishes