コード例 #1
0
 static void Execute(Object state)
 {
     Statistic.UpdateYesterdayPosts();
     Statistic.Reset();
     if (DateTime.Today.Day == 1)
     {
         OnlineTime.ResetThismonthOnlineTime();
         StatVar.Update("onlines", "lastupdate", "0");
     }
 }
コード例 #2
0
        public static void UpdateYesterdayPosts()
        {
            var count = Post.FindCountForYesterday();

            StatVar.Update("dayposts", DateTime.Now.ToString("yyyyMMdd"), count);
            var st = Current;

            st.YesterdayPosts = count;
            if (count > Statistic.Current.HighestPosts)
            {
                st.HighestPosts     = count;
                st.HighestPostsDate = DateTime.Now.Date.AddDays(-1).ToFullString();
            }
            st.Update();
        }