Show / Hide Table of Contents

Class DateTimeUtil

Inheritance
object
DateTimeUtil
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoDataBase.dll
Syntax
public static class DateTimeUtil

Methods

GetEndTime(DateTime, DateTimeSearchType)

Declaration
public static DateTime GetEndTime(DateTime time, DateTimeSearchType type)
Parameters
Type Name Description
DateTime time
DateTimeSearchType type
Returns
Type Description
DateTime

GetStartTime(DateTime, DateTimeSearchType)

Declaration
public static DateTime GetStartTime(DateTime time, DateTimeSearchType type)
Parameters
Type Name Description
DateTime time
DateTimeSearchType type
Returns
Type Description
DateTime

ToStringWithConditionalDate(DateTime)

Convert the given datetime to string, using the CultureDataFormatter. If the date part is the same as today, do not prepend the date; otherwise do prepend the date

Declaration
public static string ToStringWithConditionalDate(DateTime dateTime)
Parameters
Type Name Description
DateTime dateTime

DateTime to format

Returns
Type Description
string

Either date + time or just time

ToStringWithConditionalDate(DateTime, DateTime)

Convert the given datetime to string, using the CultureDataFormatter. If the date part is the same as the date of the reference, do not prepend the date; otherwise do prepend the date

Declaration
public static string ToStringWithConditionalDate(DateTime dateTime, DateTime reference)
Parameters
Type Name Description
DateTime dateTime

DateTime to format

DateTime reference

Reference date; date will be prepended in the result if this is different from the datetime to format

Returns
Type Description
string

Either date + time or just time

© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top