I am porting some code from Java to .NET and looking for a noda-time equivalent of the getMillisOfDay()
joda-time method of the LocalTime object.
Is there an equivalent one or must I code my own?
In Noda Time 1.x, use the LocalTime.TickOfDay
property, and then just divide it by NodaConstants.TicksPerMillisecond
to get milliseconds:
LocalTime localTime = ...;
long millis = localTime.TickOfDay / NodaConstants.TicksPerMillisecond;
See more on this question at Stackoverflow