mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-25 00:38:12 -05:00
components/buffer: use browser locale for date-separator
This commit is contained in:
parent
a0f8f1f52f
commit
393fd93253
1 changed files with 1 additions and 4 deletions
|
@ -527,10 +527,7 @@ class DateSeparator extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let date = this.props.date;
|
let date = this.props.date;
|
||||||
let YYYY = date.getFullYear().toString().padStart(4, "0");
|
let text = date.toLocaleDateString([], { year: "numeric", month: "2-digit", day: "2-digit" });
|
||||||
let MM = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
||||||
let DD = date.getDate().toString().padStart(2, "0");
|
|
||||||
let text = `${YYYY}-${MM}-${DD}`;
|
|
||||||
return html`
|
return html`
|
||||||
<div class="separator date-separator">
|
<div class="separator date-separator">
|
||||||
${text}
|
${text}
|
||||||
|
|
Loading…
Reference in a new issue