Is it possible to get the non-zero-padded month number using setDateFormat
?
If not, could you provide an alternative solution?
Use M
instead of MM
in the format string. If you use two letters, you specify that the result should have two digits, if you don't, the result can have one or two digits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With