HTML5 Data Bindings Formatter Support Product Page

Answered

How to show only the month full text of a date

Asked 30 Nov 2013 15:01:18
1
has this question
30 Nov 2013 15:01:18 Andre Bender posted:
I only want to show the full text of each Month instead of the whole date. for example "November" instead of 1.11.2013.

{{NewsDatum.formatDate( "F" )}} is not working

Do you have a description of all available date filters?

Replies

Replied 02 Dec 2013 10:41:36
02 Dec 2013 10:41:36 Teodor Kuduschiev replied:
Hello,

Unfortunately this is not possible in the current version, but i will check if this is possible to be integrated in the next updates.
Here you can see the available date/time masks:
Replied 02 Dec 2013 10:45:25
02 Dec 2013 10:45:25 Andre Bender replied:
Thanks Teodor.
Replied 08 Jul 2014 11:42:40
08 Jul 2014 11:42:40 Paola Maggi replied:
actually there is a very "dirty" system....not pretty but it works
do a series of chained "replace" on the text looking of the month number and replacing it with the long name:

.replace( " 1 ", " January " ).replace( " 2 ", " February " ).replace( " 3 ", " March " ).replace( " 4 ", " April " ).replace( " 5 ", " May " ).replace( " 6 ", " June " ).replace( " 7 ", " July " ).replace( " 8 ", " August " ).replace( " 9 ", " September " ).replace( " 10 ", " October " ).replace( " 11 ", " November " ).replace( " 12 ", " Dicember " )

I use a single digit of the month and a double digit for the day or viceversa so you do not run the risk os replacing the day together with the month
Replied 02 Oct 2014 00:23:34
02 Oct 2014 00:23:34 Brad Lawryk replied:
I could live with that as a fix for now but where would you add that code?


<span>{{artStartDate.formatDate( "MM" ).replace( " 01 ", " January " ).replace( " 02 ", " February " ).replace( " 03 ", " March " ).replace( " 04 ", " April " ).replace( " 05 ", " May " ).replace( " 06 ", " June " ).replace( " 07 ", " July " ).replace( " 08 ", " August " ).replace( " 09 ", " September " ).replace( " 10 ", " October " ).replace( " 11 ", " November " ).replace( " 12 ", " December " ) }}</span>



Doesn't work.
Replied 02 Oct 2014 11:03:27
02 Oct 2014 11:03:27 Paola Maggi replied:
here's the code that is working for me:

{{YourDateName.formatDate( "d-MM-yyyy" ).replace( "-01-", " January " ).replace( "-02-", " February " ).replace( "-03-", " March " ).replace( "-04-", " April " ).replace( "-05-", " May " ).replace( "-06-", " June" ).replace( "-07-", " July " ).replace( "-08-", " August " ).replace( "-09-", " September " ).replace( "-10-", " October " ).replace( "-11-", " November " ).replace( "-12-", " December " )}}
Replied 02 Oct 2014 14:56:03
02 Oct 2014 14:56:03 Brad Lawryk replied:
Thank you Paola! Worked like a charm!
Replied 03 Mar 2015 23:13:39
03 Mar 2015 23:13:39 Alistair Warwick replied:
Thanks Paola

That's brilliant. I've been waiting for 9 months for this problem to be fixed but your code just does it. :-)
Replied 15 Mar 2015 18:55:28
15 Mar 2015 18:55:28 Chuck Borrelli replied:
Thanks for this... I will say, that for $78, I do expect the month to be formatted as Text. It is a fairly common need.
Replied 18 Sep 2015 16:06:58
18 Sep 2015 16:06:58 Kevin Moore replied:
Just checking to see if there is a plan to have this integrated within the extension.
Thanks!

Reply to this topic