Tushar Goel wrote:Just wondering the requirement in this case. Inorder generally performed on binary search tree. After performing swap, tree is no more abide the
pre-condition(left child is less than root and right child is greater than the root).
Tony Docherty wrote:
Do you have any specific date formats in mind?
How about 2 Mar 15 or 1/4/15 or dd-mm-(yy)yy (traditional Danish) or yyyy年m月d日 (Chinese)![]()
Knute Snortum wrote:I don't think it will validate mmddyy with or without separators. This is because the constructor always assumes day, month, year.
Junilu Lacar wrote:But what happens when someone wants to validate a date that's not formatted in a way that you have defined in one of these enums? Seems like this design violates the Open-Closed Principle
Junilu Lacar wrote:Your choice of using an enum for this seems a little strange to me. It doesn't fit my mental model of an enum.