> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://con-one.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Q.サイトの日付を日本の表記に変えたい（yyyy/mm/dd形式への変更）


### A. ボディマークアップに修正コードを入れると表示が日本形式に変換されます。

サイトが海外対応している関係で、時間の表記が海外形式がデフォルトになっています。

日本形式の**年/月/日の時間の表記に変える場合**は、以下のコードを貼り付けてください。

予約の日時、ブログの日時が**〇〇年〇〇月〇〇日**に変わります。

![](https://storage.crisp.chat/users/helpdesk/website/-/f/0/8/3/f08367305081f800/image_17as8lj.png)



### 1. ビルダー→ウェブサイトの設定→カスタムコードを選択
![](https://storage.crisp.chat/users/helpdesk/website/-/f/0/8/3/f08367305081f800/image_1mqcbx0.png)


### 2. サイト全体を変える場合は、グローバルカスタムコードの「ボディマークアップをカスタム」を選択
![](https://storage.crisp.chat/users/helpdesk/website/-/f/0/8/3/f08367305081f800/image_1s8hl42.png)

### 3. ボディマークアップをカスタムに以下の修正コードを貼り付ける

###### 修正コード

```
<script>
document.addEventListener('DOMContentLoaded', function () {
  // 予約ウィジェット：「曜日, M月 D YYYY」→「YYYY年M月D日(曜日)」
  function bookingJP(text) {
    var m = text.match(/^\s*([日月火水木金土])\s*,\s*(\d{1,2})月\s*(\d{1,2})\s*(\d{4})\s*$/);
    if (!m) return null;
    return m[4] + '年' + m[2] + '月' + m[3] + '日(' + m[1] + ')';
  }
  // ブログ：「DD/MM/YYYY」または「DD/MM/YYYY HH:MM」→「YYYY年M月D日（ HH:MM）」
  function blogJP(text) {
    var m = text.match(/^\s*(\d{1,2})\/(\d{1,2})\/(\d{4})(\s+\d{1,2}:\d{2})?\s*$/);
    if (!m) return null;
    var d = parseInt(m[1], 10), mo = parseInt(m[2], 10);
    if (mo < 1 || mo > 12 || d < 1 || d > 31) return null;
    var time = m[4] ? (' ' + m[4].trim()) : '';
    return m[3] + '年' + mo + '月' + d + '日' + time;
  }

  function apply() {
    document.querySelectorAll('.selected-date-label').forEach(function (el) {
      var jp = bookingJP(el.textContent);
      if (jp) el.textContent = jp;
    });
    document.querySelectorAll(
      '.post-time p, .post-time span, .recent-post span, .recent-post p, .post-meta p, .post-meta span'
    ).forEach(function (el) {
      if (el.children.length > 0) return; // テキストのみの要素を対象
      var jp = blogJP(el.textContent);
      if (jp) el.textContent = jp;
    });
  }

  apply();
  new MutationObserver(apply).observe(document.body, {
    childList: true, subtree: true, characterData: true
  });
});
</script>
```

![](https://storage.crisp.chat/users/helpdesk/website/-/f/0/8/3/f08367305081f800/image_3v204x.png)

こちらの流れで行うと、サイトの予約ページやブログページの日付の表記が修正されます。
編集ページの表記やシステムメールの日付は現状変わりませんのでご注意ください。
あくまで、公開されたページの表記となります。




