CodeSOD: How About Next Month
The Daily WTF
MARCH 17, 2024
Dave 's codebase used to have this function in it: public DateTime GetBeginDate ( DateTime dateTime ) { return new DateTime(dateTime.Year, dateTime.Month, 01 ).AddMonths( 1 ); } I have some objections to the naming here, which could be clearer, but this code is fine, and implements their business rule. When a customer subscribes, their actual subscription date starts on the first of the following month, for billing purposes.
Let's personalize your content