Stephanie-Maks/Arduino-Chronodot — pull request #2 by declanshanaghy (2012-05-18 00:12:25+00:00)
Title: Added setters for date and time fields

Is DateTime intentionally immutable?
Maybe i'm missing something but I couldn't find any way to set the individual fields of a DateTime object.

What is the recommended way to set the datetime on the chronodot while using a keypad for input.
I had considered updating an epoch timestamp as keys were input, but that's a pain in the arse!
It's just easier to use a mutable DateTime object.

Of course i could reconstruct a new DateTime on every keypress but that seems wasteful.

In mobile app development, the accepted paradigm is actually to provide public member fields rather than access thru getters/setters to avoid the function call overhead. It seems that paradigm should be even more applicable to firmware development.