Closed MohammadSafaeii closed 1 year ago
@MohammadSafaeii Thanks for reporting. Yes, you are right we are not consistent here and it has to be fixed.
Do you have any solution? Would you like to work on it and prepare a patch?
I tried to replace every % with %%
then use this regex ([^%-]((%%)*)-?)({posix_list[i]})
but it still have some bugs and i couldn't handle it with regex
datetime checks string's characters 1 by 1 in loop, i think its better solution
@MohammadSafaeii it's fixed in the main. I'll publish the fix in the next days
in
datetime
library,%%
counts as% char
sodatetime.now().strftime('%%d')
returns'%d'
and don't consider %d as date number butjdatetime
will replace every%d
in string thereforejdatetime.datetime.now().strftime('%%d')
returns'%08'
we can use more % for example
datetime.now().strftime('%%%%%%d')
returns'%%%d'
butjdatetime.datetime.now().strftime('%%%%%%d')
returns'%%%%%08'
datetime.now().strftime('%%%%%d')
returns'%%29'
jdatetime.datetime.now().strftime('%%%%%d')
returns'%%%%08'