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())); }
/// <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"))); }