You are viewing an old revision of this post, from November 18, 2021 @ 20:09:32. See below for differences between this version and the current revision.

Jquery – Get month text from date

You can use jQuery to generate the texts from date, month, or year. Here is an example: let date = new Date(2021, 06, 21); // 2021-06-21 let longMonth = date.toLocaleString('en-us', { month: 'long' }); /* June */ let shortMonth = date.toLocaleString('en-us', { month: 'short' }); /* Jun */ let narrowMonth = date.toLocaleString('en-us', { month: 'narrow' }); /* J */

Revisions

  • November 18, 2021 @ 20:09:32 [Current Revision] by Sharing Solution
  • November 18, 2021 @ 20:09:32 by Sharing Solution
  • November 18, 2021 @ 20:08:59 by Sharing Solution

Revision Differences

There are no differences between the November 18, 2021 @ 20:09:32 revision and the current revision. (Maybe only post meta information was changed.)

No comments yet.

Leave a Reply