//取得當月第一天
DateTime FirstDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
//取得當月最後一天
DateTime LastDay = new DateTime(DateTime.Now.AddMonths(1).Year, DateTime.Now.AddMonths(1).Month, 1).AddDays(-1);
試了好久,發現到工具>選項>IntelliCode js項目設定啟用,重新開啟VS就正常了! 後來發現是TypeScript3.2版有問題停用,使用4.3版的TypeScript即可
沒有留言:
張貼留言