Class DateFunctions

This static class provides functions for working with dates.

System.Object
  Stonefield.Library.DateFunctions
public static class DateFunctions : object

Class Members

MemberDescription

CreateTimeSpanFromHoursMinutes

Takes two ints for hours and minutes, and converts to a timespan value representing that time

public static TimeSpan CreateTimeSpanFromHoursMinutes(int hours,     int minutes)

SetMaxTime

Takes a datetime, and returns a new datetime with the time component set to the max value (23:59:59)

public static DateTime SetMaxTime(DateTime datetime)

SetMinTime

Takes a datetime, and returns a new datetime with the time component set to the min value (0:00:00)

public static DateTime SetMinTime(DateTime datetime)

StripMilliseconds

DateTime extension method to return a DateTime value that strips milliseconds from the specified value.

public static DateTime StripMilliseconds(DateTime dateTime)

ToJulianDate

Converts the specified date into a Julian date.

public static int ToJulianDate(DateTime date)

Requirements

Namespace: Stonefield.Library
Assembly: library.dll