If X is uniformly distributed on the interval (0, 12), then its PDF is
or simply
and the zero-elsewhere case is assumed.
Whether you include 0 and 12 in the domain is irrelevant, since the probability that X = 0 or X = 12 are both zero.
4.7m questions
6.1m answers