I am creating incrementing invoice numbers, like so: AABBBB1122.
'A' and 'B' are bound to identifiers in my code. But the digits I need to be month and year, respectively. For example: 0821 (august, 2021). I don't want to connect it to a calendar in any way. If possible I would like to define a starting date, and increment from there.
That is: 0821 would have to be incremented to 0921, 1021, 1121, 1221 - before the year is incremented as well; 0122.
How can I do that?
What I've got so far:
string AA {
get { return this.IdentifierA.Substring(0, 2);
set { SetAndNotify(ref this.AA, value); }
}
string BB {
get { return this.IdentifierB.Substring(0, 4);
set { SetAndNotify(ref this.BB, value); }
}
string InvoiceNumber {
get { return String.Concat(AA + BB + /* what goes here? */).ToUpper(); }
set { SetAndNotify(ref this.InvoiceNumber, value);