.netmathdurationlocaltimenodatime

Mixed Duration and LocalTime math


First off, NodaTime seems like a really well thought out, full featured package, kudos. Question, maybe I am missing something, but can Duration be mixed with LocalTime in anyway? I need to do some basic math, addition, multiplication perhaps, stuff like that, and adjust a LocalTime scheduling some work. Using Duration as the basis for due times, periods, analogous to the Timer.Change pattern, for instance, stuff like this. Then apply those dimensions accordingly. Maybe there is another accepted way to accomplish this sort of thing with NodaTime.


Solution

  • Ah I discovered their guidance on arithmetic, that makes far better sense to me now.