Recently I’ve been learning Angular2 while working on the front end of an application I’ve built a lot of the backend API for, and I ran into trouble when trying to use the ng2-bootstrap time picker. This is not a highly detailed post, but I thought I’d share my initial notes on the subject in case someone else is ever searching for help.
As always, please feel free to give feedback and let me know where I could improve or change my code here. Thanks!
More Custom C# DateTime Extension Methods
[code lang=”csharp”] using System;
public class DateTimeHelper
private static readonly long DatetimeMinTimeTicks = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).Ticks;
return (long)((dt.ToUniversalTime().Ticks – DatetimeMinTimeTicks) / 10000);
More DateTime Extension Methods!