ISO8601 date should be ATOM

Created on 1 June 2024, 7 months ago

Problem/Motivation

simple_sitemap.api.php line 70 reads: // An ISO8601 formatted date.
The format in line 71 ('lastmod' => '2012-10-12T17:40:30+02:00',) is an ATOM date format.
Please update this documentation.
It would be convenient to change the example to: 'lastmod' => date(DATE_ATOM, $changed),

πŸ› Bug report
Status

Active

Version

4.1

Component

Documentation

Created by

πŸ‡³πŸ‡±Netherlands promes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @promes
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin

    Isn't ATOM a subset of ISO8601? How is this a bug? Why am I not surprised to see your username in this issue. ^^

  • πŸ‡³πŸ‡±Netherlands promes

    I should have worded my issue better.
    When I read, β€œAn ISO8601 formatted date”, I am assuming: DATE_ISO8601. According to the PHP documentation, this is: DATE_ISO8601 (example: 2005-08-15T15:52:01+0000).
    A DATE_ATOM (example: 2005-08-15T15:52:01+00:00) is exactly 1 character longer.
    Also, an example β€œβ€˜lastmod’ => β€˜2012-10-12T17:40:30+02:00’,)” requires first looking up which date characters should be used, while β€œβ€˜lastmod’ => date(DATE_ATOM, $changed)” can be copied directly into program code.

  • Status changed to Closed: works as designed 2 months ago
  • πŸ‡·πŸ‡ΊRussia walkingdexter

    When a developer decides to use DATE_ISO8601, he will see that DATE_ISO8601 is deprecated and DATE_ATOM should be used instead. However, the <lastmod> date can be formatted in different ways and ATOM format is not the only option.

Production build 0.71.5 2024