{"id":134547,"date":"2021-03-09T08:38:23","date_gmt":"2021-03-09T08:38:23","guid":{"rendered":"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-date\/"},"modified":"2024-12-03T18:04:12","modified_gmt":"2024-12-03T18:04:12","slug":"packages-date","status":"publish","type":"blocks-handbook","link":"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-date\/","title":{"rendered":"@wordpress\/date"},"content":{"rendered":"

Date module for WordPress.<\/p>\n

Installation<\/h2>\n

Install the module<\/p>\n

npm install @wordpress\/date --save\n<\/code><\/pre>\n

This package assumes that your code will run in an ES2015+<\/strong> environment. If you’re using an environment that has limited or no support for such language features and APIs, you should include the polyfill shipped in @wordpress\/babel-preset-default<\/code><\/a> in your code.<\/em><\/p>\n

API<\/h2>\n

<\/p>\n

date<\/h3>\n

Formats a date (like date()<\/code> in PHP).<\/p>\n

Related<\/em><\/p>\n