Skip to content

Conversation

@maqc1
Copy link
Contributor

@maqc1 maqc1 commented Jan 11, 2023

Default PHP strftime() also remove leading space when using the minus prefix.

Expected result :
'%-e' => '3'

Actual result :
'%-e' => ' 3'

maqc1 and others added 3 commits January 10, 2023 19:54
@alphp alphp merged commit 2ee69eb into alphp:master Jan 26, 2024
splitbrain added a commit to splitbrain/strftime that referenced this pull request May 20, 2025
* master:
  Update PHPDoc: missing throws InvalidArgumentException
  Don't override the timezone when called with a DateTime object
  Add locale-param to PHPDoc-block (alphp#20)
  Use Locale::getDefault() before setlocale(LC_TIME, '0')
  Minus prefix should also remove leading space (alphp#13)
  use "standalone" names for month and day. fixes alphp#12
alphp added a commit that referenced this pull request May 20, 2025
* use "standalone" names for month and day. fixes #12

* Minus prefix should also remove leading space (#13)

* Minus prefix should also remove space

Standard PHP strftime() also remove leading space when using the minus prefix.

* Add asserts for test '%#e' and '%-e'

---------

Co-authored-by: Fernando Herrero <[email protected]>

* Use Locale::getDefault() before setlocale(LC_TIME, '0')

* Add locale-param to PHPDoc-block (#20)

* Don't override the timezone when called with a DateTime object

* Update PHPDoc: missing throws InvalidArgumentException

---------

Co-authored-by: Fernando Herrero <[email protected]>
Co-authored-by: maqc1 <[email protected]>
Co-authored-by: Fernando Herrero <[email protected]>
Co-authored-by: alexgit2k <[email protected]>
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.

2 participants