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?
See Question&Answers more detail:osI 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?
See Question&Answers more detail:osIn 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;