Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Use Binary.

Assign each day a bit (i.e. bit 0=Mon, Bit 1=Tues, Bit 2=Wed, Bit3=Thurs, Bit 4 = Fri, Bit 5 = Sat, Bit 6=Sun), then you can "Translate" as follows: (see the code snippet)

Monday, Tuesday, Thursday becomes 1 + 2 + 8 = 11

Wed, Fri, Sun becomes 4 + 16 + 64 = 84

You can encode any number of days selected, and of course DE-code them in this way.

The every "N" weeks is just a number anyway... i.e. 1 = Every week, 2 = Every fortnight, 4=Every month etc.

So using 2 integers, you can encode your entire schedule.

Hope that makes sense!

Open in new window