Add short form month option
Moderator: Martin
Add short form month option
The dateformat only has MM or MMM options to format the month part of the date as either the number (e.g. 01) or the long name (e.g. January). It needs an option to format as the short name (Jan). It could either be done as MM/MMM/MMM or MM/mm/MMM for 01/Jan/January.
Re: Add short form month option
I got short name when using MMM. Try this script and check it in debug dialog
Code: Select all
a = getDate(2020, 1, 1);
MM = "{a,dateformat,MM}"; //01
MMM = "{a,dateformat,MMM}"; //Jan
MMMM = "{a,dateformat,MMMM}"; //January
all = "{a,dateformat,MM/MMM/MMMM}"; //01/Jan/January
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Add short form month option
Ok, so turns out I was wrong. I just so happened to try and use this in the one month that's the same in both short- and long-format (May) which is why I didn't notice. I was just basing my assumption that there was only MMM=long-format on the examples given in AutoMagic on the dateformat patter characters help screen. It only shows examples with MM that result in the month as a number and with MMM that result in a long-format month. So it seems the real issue is that that example needs to be changed from "September" to "Sep" and another example needs to be added that uses MMMM and "September."
Re: Add short form month option
Yes, it seems the example is wrong, need to be fixed. I never spot that.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Add short form month option
Thanks for reporting! I'll update the documentation and add another example.
Regards,
Martin
Regards,
Martin