toLocaleDateString() not working in JSON list view formatting
It appears that the toLocaleDateString() function only works in JSON column formatting and not in JSON list view formatting. Is this expected?
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
I'm not seeing this issue currently:
Column Formatting:

View Formatting:

Could you elaborate on your use case or provide a sample of your format? Thanks!
Sure. I'm in Australia and the library I am working with is in a SharePoint site that has the following regional settings:

I am using list view formatting and have the following line to display the last modified person's name and when a document was last modified. The line of JSON is as follows:
"txtContent": "='Last modified by ' + [$Editor.title] + ', ' + toLocaleDateString([$Modified])",
The example document I am using was last modified on August 10, 2020 but using the JSON above, the display is as follows:

If I create a calculated column (called ModifiedDDMMYYYY) to format the 'Modified' column as text and use the following JSON:
"txtContent": "='Last modified by ' + [$Editor.title] + ', ' + [$ModifiedDDMMYYYY]",
....I get the following displayed:

My question is, why doesn't the toLocaleDateString() function have the desired effect i.e. displaying the date in DD/MM/YYYY format?
If you need any more details let me know. And thanks for being so quick to respond!
Same issue here - toLocaleDateString() does not seem to adopt the correct date/time format set for the site/list
@JoeAyre @kikogerde Thanks for reporting this.
toLocaleString, toLocaleTimeString and toLocaleDateString currently relies on the browser's locale settings, which may be different from Site/User locale settings. I will have a look at this.
I will recommend you to try .displayValue property for Date Fields, which will get the value based on the field settings.
@JoeAyre @kikogerde This is now fixed, and shall be available on your tenants in upcoming updates.
@JoeAyre @kikogerde @thechriskent I will recommend using .displayValue property in case you intend to maintain the default display text for Date fields. It's much easier to use and works with 'friendly format'.
The fix is rolled out. Closing this.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues