sonntagsgesicht/businessdate ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python library for working with business dates in a simple, practical way.
I want to be able to create a business date from normal date formats like 20140111, 2014 01 11, or a regular Python date, then add or subtract flexible periods like 2w, 1Y3M, or 10B. It should handle weekend and holiday adjustments so dates can be moved to the next or previous valid business day. I also want support for year fraction calculations using common day count conventions, since this is for financial style date work.
Please include a way to generate date ranges and payment schedules between two dates, with sensible helpers for things like loan or derivative cash flow schedules. Keep the API clean and easy to use from plain Python. If you need to check current best practices or details, look up the docs online first and then implement it with good tests and examples.
Are you gonna build this?
make sure you review the code using coderabbit