(s)
| 104 | |
| 105 | |
| 106 | function localeDateString(s) { |
| 107 | if (!s) return null; |
| 108 | const options = { day: 'numeric', month: 'short', year: 'numeric' }; |
| 109 | s = s.replace(/-/g, '/'); // fix browser-specific Date() issues |
| 110 | const d = new Date(s); |
| 111 | if (isNaN(d.getTime())) return null; |
| 112 | |
| 113 | const localeCode = context.systems.l10n.localeCode(); |
| 114 | return d.toLocaleDateString(localeCode, options); |
| 115 | } |
| 116 | |
| 117 | |
| 118 | render.note = function(val) { |
no test coverage detected