Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow packages to use ISO 8601 dates in their PackageInfo.g #2727

Closed
fingolfin opened this issue Aug 22, 2018 · 5 comments
Closed

Allow packages to use ISO 8601 dates in their PackageInfo.g #2727

fingolfin opened this issue Aug 22, 2018 · 5 comments
Labels
good first issue Issues that can be understood and addressed by newcomers to GAP development kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)

Comments

@fingolfin
Copy link
Member

It would be nice if packages could also specify the release date in ISO 8601 format, i.e., as YYYY-MM-DD. This is less ambiguous than the current DD/MM/YYYY (which e.g. Americans may confuse with MM/DD/YYY).

Besides needing to modify lib/package.gi and the documentation, it may also be necessary to modify the package distribution.

This might be a good "first issue"?

@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker) labels Aug 22, 2018
@olexandr-konovalov
Copy link
Member

Cf. also gap-system/gap-distribution#20.

I think we can implement this in a way that both formats will be permitted concurrently, and that ValidatePackageInfo will display an advice to switch to ISO 8601 (maybe at some info level, otherwise this will show up too often if #2726 is merged).

Indeed, not a problem to detect whether the date is in YYYY-MM-DD or DD/MM/YYYY format.

@cdwensley
Copy link
Contributor

Date := "28/08/2018" is converted by GAPDoc to "28 August 2018" in a manual front page, whereas
Date := "2018-08-28" remains unchanged, which is not as nice. Perhaps @frankluebeck can comment?

@olexandr-konovalov
Copy link
Member

I think that's a question to AutoDoc rather then to GAPDoc authors. AutoDoc extracts the date from PackageInfo.g, while GAPDoc - not.

@fingolfin fingolfin added the good first issue Issues that can be understood and addressed by newcomers to GAP development label Nov 27, 2018
@fingolfin
Copy link
Member Author

Indeed, AFAIK does nothing with title pages. But we can certainly add support to ISO dates in GAPDoc, too. Alternatively, we could simply convert the date from ISO 8601 to the "old" date format on the fly while loading, thus preserving full compatibility with any code that might for whatever reason try to parse these dates.

@wucas
Copy link
Contributor

wucas commented Mar 19, 2019

I'm working on a PR to change ValidatePackageInfo so it accepts both formats.

wucas pushed a commit to wucas/gap that referenced this issue Mar 20, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Update relevant testfile

Fixes gap-system#2727
wucas pushed a commit to wucas/gap that referenced this issue Mar 21, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Update relevant testfile

Fixes gap-system#2727
wucas pushed a commit to wucas/gap that referenced this issue Mar 22, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Update relevant testfile

Fixes gap-system#2727
wucas pushed a commit that referenced this issue Aug 20, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Add normalisation of date format to AddPackageInfos

Update relevant testfile

Fixes #2727
wucas pushed a commit that referenced this issue Aug 20, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Add normalisation of date format to AddPackageInfos

Update relevant testfile

Fixes #2727
wucas pushed a commit to wucas/gap that referenced this issue Aug 20, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Add normalisation of date format to AddPackageInfos

Update relevant testfile

Fixes gap-system#2727
wucas pushed a commit to wucas/gap that referenced this issue Aug 20, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Add normalisation of date format to AddPackageInfos

Update relevant testfile

Fixes gap-system#2727
wucas pushed a commit to wucas/gap that referenced this issue Sep 9, 2019
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Add normalisation of date format to AddPackageInfos

Update relevant testfile

Fixes gap-system#2727
fingolfin pushed a commit to wucas/gap that referenced this issue Mar 19, 2020
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Add normalisation of date format to AddPackageInfos

Update relevant testfile

Fixes gap-system#2727
fingolfin pushed a commit to wucas/gap that referenced this issue Apr 30, 2020
If the date format is dd/mm/yyyy and InfoLevel InfoPackageLoading
is set to at least 2 it prints a hint to change the format.

Add validity check for dates

Add normalisation of date format to AddPackageInfos

Update relevant testfile

Fixes gap-system#2727
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that can be understood and addressed by newcomers to GAP development kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)
Projects
None yet
Development

No branches or pull requests

4 participants