예제 #1
0
        public void AppendValue(DateTime value)
        {
            var daysUntil    = value.GetDate().DaysUntil(new Date());
            var minutesUntil = (long)daysUntil * MINUTESINDAY;
            var totalMinutes = ((long)value.GetHours() * MINUTESINHOUR) + (long)value.GetMinutes();

            minutesUntil += totalMinutes;
            mElements.Add(new RecordElement(RecordElementType.DATETIME, minutesUntil.ToString()));
        }
예제 #2
0
파일: Helper.cs 프로젝트: cheriephi/diary
 /// <summary>
 /// Returns DateTime identifying properties.
 /// </summary>
 /// <returns>yyyy-MM-dd hh:mm</returns>
 /// <seealso cref="Helper.ToString(Date)"/>
 internal static String ToString(Diary.DateTime dateTime)
 {
     return(String.Format("{0} {1}:{2}", Helper.ToString(dateTime.GetDate()), dateTime.GetHours().ToString("00"), dateTime.GetMinutes().ToString("00")));
 }