Support for capitalisation in date formatting
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 784
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request
In glibc strftime, we have the `^` operator which provides this functionality. However, it's not cross-platform, and surprisingly there exists no clean way to uppercase alphabets in Windows. I have faced this issue and am looking for an alternative that will allow me to do this in a platform-agnostic way. It is supported out of the box by Java's `String.format()`.
PS: I can't just do .to_upper() to the string
A detailed example for such use case:
I need to generate get requests to a server, one day after another. The url paths on that server are case sensitive and I have multiple websites on which I need to do this testing. So essentially I need someting like:
```
requests.get('www.example.com/JUN/06/2020/file.csv')
requests.get('www.example.com/JUL/06/2020/file.csv')
requests.get('www.example.com/AUG/06/2020/file.csv')
```
On glibc, I can simply do:
```
date.format('www.example.com/%^b/%d/%Y/file.csv')
```
and get the desired file because it supports capitalisation. However, there is no clean alternative to do the same in windows. I'm hoping Arrow would bridge the gap.
In, fact, if feasible, it'll be a great addition if arrow can support all glibc extensions.
Pardon me if arrow already supports this, but I couldn't figure it out from the documentation.
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no file, test, or entry point. Start by locating Arrow's date-formatting implementation and its formatting documentation, then inspect existing format-token tests; done means a documented, platform-independent capitalization behavior with coverage for the requested month formatting and clear handling of unsupported extensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100