? Maintainers Checked Failure

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
26 Nov 2019

The translators decided to standardise the date format in their language packs to use the ISO 8601 date format. Thus it makes sense that core uses the same format for core language XML as well.

The build script currently only knows one creation date for all XML files, so it will affect also administrator/manifests/files/joomla.xml, not only language ones.

Initially this PR only changed the build script and the XMLs updated by it. I've expanded it now so it contains all core XML files.

Also in the extension manager, you can sort by date and the date is formatted according to the active language.

Summary of Changes

Changing the format of the creation date to use eg 2019-11-26 instead of November 2019

Testing Instructions

You can try and run the build/bump.php and see the creation date in the XML files. That script is used when a new release is built.

administrator/language/en-GB/en-GB.xml
administrator/language/en-GB/install.xml
administrator/manifests/files/joomla.xml
administrator/manifests/packages/pkg_en-GB.xml
installation/language/en-GB/en-GB.xml
language/en-GB/en-GB.xml
language/en-GB/install.xml

In the extension manager, try sorting by date.
It may be necessary to select all extensions and hit the "Refresh Cache" button so the creation dates are updated from the XMLs.
Also try with different languages and see if the date format changes.

Expected result

Date format like 2019-11-26 (or 26.11.2019 or whatever is specific to the active language)

Actual result

Date format like November 2019

Documentation Changes Required

None

avatar Bakual Bakual - open - 26 Nov 2019
avatar Bakual Bakual - change - 26 Nov 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Nov 2019
Category Repository
avatar brianteeman
brianteeman - comment - 26 Nov 2019

Do we really need to know the day?

avatar brianteeman
brianteeman - comment - 26 Nov 2019

Also it introduces an inconsistency as all the other files use Month Year as their creationDate.

image

avatar Bakual
Bakual - comment - 27 Nov 2019

Personally I don't care much how it is done. But I see indeed advantages in it.

  • I think the day is part of a date and should be there. I don't see a reason to not show it, especially since it is part of a script.
  • The current way is using english words which aren't translated. The proposed way would be language independent. It could even be translated into different formats and used to sort the list, if we ever want to do that (and get extensions to consistently use it).
avatar brianteeman
brianteeman - comment - 27 Nov 2019

I understand and appreciate the issue with it being in English. However for me the problem is

  1. Consistency as explained above
  2. Clarity - is 2019-1-11 the first of November or the eleventh of January.
avatar ot2sen
ot2sen - comment - 27 Nov 2019

2 is exactly the reason for the ISO standard to get rid of that confusion
og which is which. Y-M-D :)
Good call by the translators.
Would be fine if the older are updated for consistency

On Wed, Nov 27, 2019 at 8:58 AM Brian Teeman notifications@github.com
wrote:

I understand and appreciate the issue with it being in English. However
for me the problem is

  1. Consistency as explained above
  2. Clarity - is 2019-1-11 the first of November or the eleventh of
    January.

β€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/joomla/joomla-cms/pull/27162?email_source=notifications&email_token=AAGA7LM74XLRIVK25IG4DLLQVYSD7A5CNFSM4JR6TUW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFIUJJI#issuecomment-558974117,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGA7LLI2HPMZVXYKTDB6Y3QVYSD7ANCNFSM4JR6TUWQ
.

avatar brianteeman
brianteeman - comment - 27 Nov 2019

Try explains that to the people who live in the USA

avatar alikon
alikon - comment - 27 Nov 2019

why to have 2 format ?
one for 'reldate' => date('j-F-Y'),
and another one for 'credate' => date('Y-m-d'),

avatar infograf768
infograf768 - comment - 27 Nov 2019

I am a bit confused.
How would such dates be translated in the language packs xmls as we can enter whatever we want there?

avatar Bakual
Bakual - comment - 27 Nov 2019

How would such dates be translated in the language packs xmls as we can enter whatever we want there?

The point is that you are not supposed to enter whatever you want. According to the forum post by Mig. :)
I'm not saying we're going to translate them. I just say it could be done if at least the majority would follow that format.

avatar brianteeman
brianteeman - comment - 27 Nov 2019

I just say it could be done if at least the majority would follow that format.

and all of the core xml would need to be updated (they are not covered by the bump script) and I still say it is more confusing to have 2019-1-11

avatar Bakual
Bakual - comment - 27 Nov 2019

I still say it is more confusing to have 2019-1-11

The format Y-d-m isn't used in that many countries. According to Wikipedia it's only 4 countries. So my guess would be most would read that date as January 11, 2019.

Rewriting all the other core XMLs would be rather simple, I can do that of course. My initial goal was just the language pack files so they follow what the translators have as their guidelines.

avatar ot2sen
ot2sen - comment - 27 Nov 2019

Would be nice to have it fully covered. The English text currently from the
XMLs are only of use to some while the ISO standard is of use to everyone :)

On Wed, Nov 27, 2019 at 10:57 PM Thomas Hunziker notifications@github.com
wrote:

I still say it is more confusing to have 2019-1-11

The format Y-d-m isn't used in that many countries. According to Wikipedia
it's only 4 countries. So my guess would be most would read that date as
January 11, 2019.

Rewriting all the other core XMLs would be rather simple, I can do that of
course. My initial goal was just the language pack files so they follow
what the translators have as their guidelines.

β€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/joomla/joomla-cms/pull/27162?email_source=notifications&email_token=AAGA7LI2VB5AVTKSRF4C4M3QV3ULHA5CNFSM4JR6TUW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFK3DUY#issuecomment-559264211,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGA7LIT57S2J4X3RUN4AU3QV3ULHANCNFSM4JR6TUWQ
.

avatar brianteeman
brianteeman - comment - 27 Nov 2019

Might only be 4 countries but it's a significant % of users

avatar Bakual
Bakual - comment - 28 Nov 2019

Might only be 4 countries but it's a significant % of users

I honestly don't know how that equates to user. Countries are Kazakhstan, Latvia, Nepal and Turkmenistan.
On the other hand, using an english word for the month isn't that inclusive either.

I will expand this PR so it includes all created dates. And I'll have a look at how work it would be to make it translateable and sortable.

avatar laoneo
laoneo - comment - 28 Nov 2019

Using an ISO standard is a good move. Since today I'm using the day also in my releases. If accepted extension devs can follow it.

avatar rdeutz rdeutz - change - 3 Dec 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 3 Dec 2019
Category Repository Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder com_installer com_joomlaupdate com_languages com_login com_media com_menus com_messages com_modules com_newsfeeds com_plugins com_postinstall
avatar Bakual
Bakual - comment - 3 Dec 2019

I've expanded this PR so it changes all creationDate instances to the ISO format.
I've also added sorting by date to the extension manager and the date will be shown "translated" where possible (depending on the source format of the date).

Obviously, sorting by date doesn't work properly for the dates that aren't entered by the ISO format. This gives a gentle push to extension devs to also use the ISO format for the date.

avatar Bakual Bakual - change - 3 Dec 2019
Title
Use Y-m-d format for creation dates in language XML
Use Y-m-d format for creation dates in extension XML. Adds date sorting to extension manager
avatar Bakual Bakual - edited - 3 Dec 2019
avatar brianteeman
brianteeman - comment - 3 Dec 2019

I stand by the comment that this will cause confusion as people wont know what month 2019-11-1 is

avatar Bakual Bakual - change - 3 Dec 2019
The description was changed
avatar Bakual Bakual - edited - 3 Dec 2019
avatar Bakual Bakual - change - 3 Dec 2019
Title
Use Y-m-d format for creation dates in extension XML. Adds date sorting to extension manager
Use Y-m-d format for creation dates in extension XML. Adds date sorting to extension manager and localised date formats.
avatar Bakual Bakual - edited - 3 Dec 2019
avatar Bakual
Bakual - comment - 3 Dec 2019

I stand by the comment that this will cause confusion as people wont know what month 2019-11-1 is

The date is now shown localised in the format by the active language. So no confusion anymore.

avatar Bakual
Bakual - comment - 3 Dec 2019

english:
english
german:
deutsch

avatar brianteeman
brianteeman - comment - 3 Dec 2019

You are assuming that everyone has the correct language pack installed. For example there have only been 6000 downloads of the US-English

avatar rdeutz
rdeutz - comment - 3 Dec 2019

Test needs to be fixed when we go this way:

1) JInstallerManifestLibraryTest::testLoadManifestFromData

Failed asserting that two strings are equal.

--- Expected

+++ Actual

@@ @@

-'2008'

+'2008-01'
avatar Bakual
Bakual - comment - 3 Dec 2019

You are assuming that everyone has the correct language pack installed.

No, I'm not assuming this.
But if people would really get confused with the date format, then there would be an easy solution available by installing and selecting the language.

Test needs to be fixed when we go this way:

Test fixed.

avatar Bakual Bakual - change - 13 Feb 2020
Labels Added: Conflicting Files
avatar Bakual
Bakual - comment - 13 Feb 2020

Rebased and conflicts solved

avatar N6REJ
N6REJ - comment - 14 Feb 2020

I have tested this item πŸ”΄ unsuccessfully on f9ed44b

Didn't make any difference after applying the patch via patchtester. Nor did it respect the currently language after I set us english as default.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27162.

image
image

avatar N6REJ N6REJ - test_item - 14 Feb 2020 - Tested unsuccessfully
avatar Bakual
Bakual - comment - 14 Feb 2020

That the date format didn't change with US English is actually due to the US Englisch language pack being faulty. The respective language string is DATE_FORMAT_LC4="Y-m-d". Same as in en-GB. I think in US you use "Y-d-m" instead?
If you adjust that string in the en-US.ini file (or by using a language override) it should work.

Also, it may be necessary to select all extensions and hit the "Refresh Cache" button so the creation dates are updated from the XMLs.

avatar Bakual Bakual - change - 14 Feb 2020
The description was changed
avatar Bakual Bakual - edited - 14 Feb 2020
avatar chmst
chmst - comment - 14 Feb 2020

Using the patchtester I got the message:
The file marked for modification does not exist: administrator/components/com_installer/models/extension.php

avatar Quy
Quy - comment - 14 Feb 2020

@chmst This PR is for J3 and not J4.

avatar N6REJ
N6REJ - comment - 14 Feb 2020

That the date format didn't change with US English is actually due to the US Englisch language pack being faulty. The respective language string is DATE_FORMAT_LC4="Y-m-d". Same as in en-GB. I think in US you use "Y-d-m" instead?

nope, we use m-d-Y

avatar N6REJ
N6REJ - comment - 14 Feb 2020

Also, it may be necessary to select all extensions and hit the "Refresh Cache" button so the creation dates are updated from the XMLs.

shouldn't the "january 2020" have changed to numeric?

avatar infograf768
infograf768 - comment - 15 Feb 2020

I have tested this item βœ… successfully on f9ed44b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27162.

avatar infograf768 infograf768 - test_item - 15 Feb 2020 - Tested successfully
avatar infograf768
infograf768 - comment - 15 Feb 2020

@N6REJ
There is no more "january 2020" after patch.

avatar alikon
alikon - comment - 15 Feb 2020

i've not runned the bump script
when i sort let's say for date descending the result is incorrect
Screenshot from 2020-02-15 08-30-50

avatar infograf768
infograf768 - comment - 15 Feb 2020

when i sort let's say for date descending the result is incorrect

I must say I did not test that.

avatar brianteeman
brianteeman - comment - 15 Feb 2020

probably because the date is being sorted by the stored value and not the displayed value

avatar Bakual
Bakual - comment - 15 Feb 2020

Make sure to select all extensions and use the "Refresh Cache" button. That is because the dates from the XMLs are stored in the database. When I changed the XMLs, the database isn't automatically updated and thus still has the old values.
I think the database is updated during the update process, but honestly I'm not sure about that. Maybe someone else knows.

avatar infograf768
infograf768 - comment - 16 Feb 2020

Sorting by date works here (I had refreshed cache).
Evidently, if the xml has not been modified (for example patchtester or Installation from web), we have weird results.

avatar Bakual Bakual - change - 17 Aug 2020
Labels Removed: Conflicting Files
avatar Bakual
Bakual - comment - 19 Oct 2020

Merged current staging and resolved conflicts

avatar Bakual
Bakual - comment - 3 Aug 2021

Is there any interest in getting this into core? If so, I can update the branch, otherwise I would close it.

avatar laoneo
laoneo - comment - 4 Aug 2021

Perhaps more for 4.1?

avatar Bakual
Bakual - comment - 4 Aug 2021

Sure, for 4.0 it's to late πŸ˜„

avatar laoneo
laoneo - comment - 7 Oct 2021

Would be nice to rebase for 4.1 and then get another round of testing.

avatar HLeithner
HLeithner - comment - 7 Oct 2021

Is there any interest in getting this into core? If so, I can update the branch, otherwise I would close it.

Yes, please update the PR for 4.1.

avatar Bakual Bakual - change - 7 Oct 2021
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2021
Category Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder com_installer com_joomlaupdate com_languages com_login com_media com_menus com_messages com_modules com_newsfeeds com_plugins com_postinstall Unit Tests Repository Administration
avatar Bakual Bakual - change - 7 Oct 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2021
Category Administration Unit Tests Repository Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder com_installer com_joomlaupdate com_languages com_login com_media com_menus com_messages com_modules com_newsfeeds com_plugins com_postinstall com_redirect com_tags
avatar Bakual
Bakual - comment - 7 Oct 2021

I've tried on my laptop, but messed it up somehow with the conflict resolving. I need to do it when I'm back home.

avatar Bakual Bakual - change - 7 Oct 2021
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 7 Oct 2021
Category Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder com_installer com_joomlaupdate com_languages com_login com_media com_menus com_messages com_modules com_newsfeeds com_plugins com_postinstall com_redirect com_tags Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder com_installer com_joomlaupdate com_languages com_login com_media com_menus com_messages com_modules com_newsfeeds com_plugins
avatar Bakual
Bakual - comment - 7 Oct 2021

Recreated for 4.1 as there were two many changes between 3.10 and 4.1. It was easier to cherrypick the things I need and redo the rest manually.
I couldn't test it yet myself but it should work the same as before.

avatar laoneo
laoneo - comment - 4 Apr 2022

@Bakual can you fix the conflicts and then hopefully we will find testers for this one as it is a nice change.

avatar Bakual Bakual - change - 4 Apr 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2022
Category Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder com_installer com_joomlaupdate com_languages com_login com_media com_menus com_messages com_modules com_newsfeeds com_plugins Unit Tests Repository Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder
avatar Bakual
Bakual - comment - 4 Apr 2022

Rebased to 4.2 and solved conflicts.

avatar Bakual Bakual - change - 4 Apr 2022
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2022
Category Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder Unit Tests Repository Administration com_admin com_ajax com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_cpanel com_fields com_finder com_installer com_joomlaupdate com_languages com_login com_media com_menus com_messages com_modules com_newsfeeds com_plugins
avatar Bakual
Bakual - comment - 4 Apr 2022

Found a few more creationDates. Should be ready for testin again.

avatar Bakual Bakual - change - 4 Apr 2022
Labels Added: ?
Removed: ?
avatar laoneo
laoneo - comment - 4 Apr 2022

Thanks. There are still some conflicts in installation and api.

avatar Bakual
Bakual - comment - 4 Apr 2022

Richard promised me they will be gone once 4.1 is merged up into 4.2 next time.

avatar Bakual
Bakual - comment - 5 Apr 2022

Tried again and changed the 2005-01 date to 2005-08 so it matches the Joomla release

avatar Bakual Bakual - change - 5 Apr 2022
Labels Removed: ?
avatar laoneo
laoneo - comment - 8 Apr 2022

I have tested this item βœ… successfully on ea91a81

I could not install a language as they do not exist for 4.2 but I did a language override of the constant DATE_FORMAT_LC4 and then the date in the extension manager has changed.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27162.

avatar laoneo laoneo - test_item - 8 Apr 2022 - Tested successfully
avatar richard67
richard67 - comment - 22 Apr 2022

@Bakual Is the description of this PR still right? It says:

Initially this PR only changed the build script and the XMLs updated by it. I've expanded it now so it contains all core XML files.

But in the changes I cannot find any change in the build script.

avatar Bakual
Bakual - comment - 22 Apr 2022

Looks like it got lost during the several redoing/conflict solving of this PR.

avatar Bakual
Bakual - comment - 22 Apr 2022

Added back the changes in the bump script.

avatar laoneo
laoneo - comment - 23 Apr 2022

I have tested this item βœ… successfully on ae3da48

I tested it again with a language override of the constant DATE_FORMAT_LC4 and then the date in the extension manager has changed. Run also the buzmp script php build/bump.php -v 4.2.9 and then the first entry showed version 4.2.9 with the current date.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27162.

avatar laoneo laoneo - test_item - 23 Apr 2022 - Tested successfully
avatar laoneo
laoneo - comment - 23 Apr 2022

The first entries are listed from 2004, is this correct?

avatar Bakual
Bakual - comment - 23 Apr 2022

The first entries are listed from 2004, is this correct?

I didn't validate the dates. I just took what was there and changed the format. πŸ˜„

avatar richard67
richard67 - comment - 23 Apr 2022

Run also the buzmp script php build/bump.php -v 4.2.9 and then the first entry showed version 4.2.99 with the current date.

@laoneo I hope this is a typo and the patch version was not changed from 9 to 99.

avatar laoneo
laoneo - comment - 23 Apr 2022

Yes sure was a typo, just wanted to make sure it used my bump version.

avatar Bakual Bakual - change - 3 May 2022
Labels Added: Conflicting Files Maintainers Checked
avatar Bakual
Bakual - comment - 3 May 2022

Merged upstream and solved conflicts

avatar roland-d roland-d - close - 3 May 2022
avatar roland-d roland-d - merge - 3 May 2022
avatar roland-d roland-d - change - 3 May 2022
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-05-03 20:04:06
Closed_By roland-d
Labels Removed: Conflicting Files
avatar roland-d
roland-d - comment - 3 May 2022

Thanks everybody.

avatar Bakual
Bakual - comment - 3 May 2022

Wohoooo! πŸ•ΊπŸ»

avatar laoneo
laoneo - comment - 4 May 2022

Nice!!

avatar korenevskiy
korenevskiy - comment - 13 Sep 2022

It's obvious. An XML file is a data storage format. I repeat this is the data format. XML tags can store any type of data. If only the "CreationDate" tag is a text type, then the format of this tag is obvious, but if the "creation Date" tag is a date type, then this implies the format in ISO. If we remember that XML is a data format, and XML is not a text document of articles. XML is a data warehouse, just like SQL is a data warehouse. The difference is that SQL is data processing and storage, and XML is just data storage.
But let's look at this problem from the other side. Third-party developers can create components for sorting by date tag.
Even if there is no sorting in Joomla, the data storage format must match the content.
We store data in SQL in ISO format. Maybe we will store data in SQL in the "Nov 2022" format?

Add a Comment

Login with GitHub to post a comment