Closed updooter closed 6 months ago
You're right, it misses Aa
chars.
Just to have a "real" case to test it on, could you please post your own format string here?
You're right, it misses
Aa
chars. Just to have a "real" case to test it on, could you please post your own format string here?
YYYY-MM-DD hh:mm A
Ok, fixed and cleaned it up a bit (more readable) 😉
I've also removed 2 unsupported options, Z
and ZZ
, from format help text.
https://github.com/nicorac/bcr-gui/commit/cbc04e50e52d298a6ff785ee93ca97c53a4ceca4
PS: I'd like to also fix #63 before releasing an update.
I don't know if you've ever used BCR 12-hours format in filenames; if so, could you please post some sample filenames, formatted in 12h format, for me to test the parsing algorithm?
My doubt is: how should I manage the value 12
in hours together with AM//PM
flag?
i dont use the 12h format in the bcr filenames, however i think you could just convert them into 24h like this: (hour, flag) -> (hour % 12) + (flag == "AM" ? 0 : (flag == "PM" ? 12 : error()))
I believe this file on line 65 needs to have a and A letters inside that function call, so like YMDHAhmsa instead of YMDHhms https://github.com/nicorac/bcr-gui/blob/b72326e92d823b95cf498efe1619db141dfdb77d/src/app/pipes/datetime.pipe.ts#L65