Was this page helpful?

DateTimeUtil Static Class

    Table of contents
    1. 1. Members
      1. 1.1. Methods
    Table of Contents
    public static class DateTimeUtil
    Namespace: System
    Assembly: mindtouch.dream
    Type Hierarchy:
    • object
      • DateTimeUtil
    Static utility class containing extension and helper methods for working with System.DateTime.

    Members

    Methods

    Visibility Description
    Public ToSafeUniversalTime(this DateTime date) (Extension) Safely get the UTC System.DateTime for a given input.
    Public WithoutMilliseconds(this DateTime date) (Extension) Remove the millisecond component from a date.
    Public ToEpoch(this DateTime date) (Extension) Get the utc-based unix epoch time.
    Public FromEpoch(uint secondsSinceEpoch) Get a DateTime instance from utc-based unix epoch time.
    Public ParseInvariant(string value) Parse a date using CultureInfo.InvariantCulture.
    Public ParseExactInvariant(string value, string format) Parse a date using CultureInfo.InvariantCulture and an exact date format.
    Public TryParseInvariant(string value, out DateTime date) Try to parse a date using CultureInfo.InvariantCulture.
    Public TryParseExactInvariant(string value, string format, out DateTime date) Try to parse a date using CultureInfo.InvariantCulture.
    Public ToString() (Inherited from Object)
    Public Equals(object obj) (Inherited from Object)
    Public GetHashCode() (Inherited from Object)
    Public GetType() (Inherited from Object)
    Protected MemberwiseClone() (Inherited from Object)
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by