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

bug-733 : fix src/lib/libast/tm/tmxdate.c #734

Merged
merged 1 commit into from
Mar 30, 2024
Merged

Conversation

phidebian
Copy link

While normalising the 'f' variable usage into tmxdate() the TM_ORDINAL case was overlooked.

While normalising the 'f' variable usage into tmxdate() the TM_ORDINAL case
was overlooked.
@McDutchie McDutchie merged commit 4b08a0d into ksh93:dev Mar 30, 2024
McDutchie pushed a commit that referenced this pull request Mar 30, 2024
Reproducers:

    $ printf '%(%F)T\n' '4th tuesday in march 2016'
    2016-04-09
    $ printf '%(%F)T\n' '4nd tuesday in march 2016'
    2016-03-08

Expected, in both cases: 2016-03-22

It was a left over, while I reworked these things some time ago, I
normalised the 'f' variable usage (specially the +1 -1 usage), and
the cryptic TM_ORDINAL case was kinda magical and I left it
untouched.

Now thanx @stephane-chazelas, I got a test case and can understand
it. I added a test case to catch any regression in this area if one
try to make printf better :-)

src/lib/libast/tm/tmxdate.c:
- tmxdate(): While normalising the 'f' variable usage into
  tmxdate(), also handle the TM_ORDINAL case, which had been
  overlooked.

Thanks to @stephane-chazelas for the bug report.
Resolves: #733
McDutchie pushed a commit that referenced this pull request Mar 30, 2024
Reproducers:

    $ printf '%(%F)T\n' '4th tuesday in march 2016'
    2016-04-09
    $ printf '%(%F)T\n' '4nd tuesday in march 2016'
    2016-03-08

Expected, in both cases: 2016-03-22

It was a left over, while I reworked these things some time ago, I
normalised the 'f' variable usage (specially the +1 -1 usage), and
the cryptic TM_ORDINAL case was kinda magical and I left it
untouched.

Now thanx @stephane-chazelas, I got a test case and can understand
it. I added a test case to catch any regression in this area if one
try to make printf better :-)

src/lib/libast/tm/tmxdate.c:
- tmxdate(): While normalising the 'f' variable usage into
  tmxdate(), also handle the TM_ORDINAL case, which had been
  overlooked.

Thanks to @stephane-chazelas for the bug report.
Resolves: #733
McDutchie pushed a commit that referenced this pull request Mar 30, 2024
Reproducers:

    $ printf '%(%F)T\n' '4th tuesday in march 2016'
    2016-04-09
    $ printf '%(%F)T\n' '4nd tuesday in march 2016'
    2016-03-08

Expected, in both cases: 2016-03-22

It was a left over, while I reworked these things some time ago, I
normalised the 'f' variable usage (specially the +1 -1 usage), and
the cryptic TM_ORDINAL case was kinda magical and I left it
untouched.

Now thanx @stephane-chazelas, I got a test case and can understand
it. I added a test case to catch any regression in this area if one
try to make printf better :-)

src/lib/libast/tm/tmxdate.c:
- tmxdate(): While normalising the 'f' variable usage into
  tmxdate(), also handle the TM_ORDINAL case, which had been
  overlooked.

Thanks to @stephane-chazelas for the bug report.
Resolves: #733
McDutchie pushed a commit that referenced this pull request Mar 30, 2024
Reproducers:

    $ printf '%(%F)T\n' '4th tuesday in march 2016'
    2016-04-09
    $ printf '%(%F)T\n' '4nd tuesday in march 2016'
    2016-03-08

Expected, in both cases: 2016-03-22

It was a left over, while I reworked these things some time ago, I
normalised the 'f' variable usage (specially the +1 -1 usage), and
the cryptic TM_ORDINAL case was kinda magical and I left it
untouched.

Now thanx @stephane-chazelas, I got a test case and can understand
it. I added a test case to catch any regression in this area if one
try to make printf better :-)

src/lib/libast/tm/tmxdate.c:
- tmxdate(): While normalising the 'f' variable usage into
  tmxdate(), also handle the TM_ORDINAL case, which had been
  overlooked.

Thanks to @stephane-chazelas for the bug report.
Resolves: #733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants