Pattern: Format Today's Date in Another Language (e.g. French)

Thomas_937381Thomas_937381 Posts: 196
edited July 23 in Show and Tell

The attached pattern will get today's date and format it in written French (le 23 juillet 2020, for example). In the step Translate month name (English to French), another language could be used by changing the destination language month in the formula, following this convention:

if (my.includes("January")) {
result = my.replace("January","janvier") }

Simply replace janvier with the equivalent of January in your language of choice, and repeat for each month. The step Change 1 to 1er if first day of month may need to be removed and the dependencies changed, for languages other than French.

The pattern could be especially useful for document assembly (letters, contracts), but also for email messages where your audience requires the long-form, written date.

Sign In or Register to comment.