Click or drag to resize
Moment Class
Moment object which provides support for several DateTime functions that are not built-in to C#
Inheritance Hierarchy
SystemObject
  MomentSharpMoment

Namespace: MomentSharp
Assembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class Moment

The Moment type exposes the following members.

Constructors
  NameDescription
Public methodMoment
Get's a new Moment defaulting values to DateTime.UtcNow, unless zero is true in which values will be set to the min value
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodCalendar(DateTime)Overloaded.
Will format a date with different strings depending on how close to referenceTime's date (today by default) the date is. Emulates: http://momentjs.com/docs/#/displaying/calendar-time/
(Defined by Display.)
Public Extension MethodCalendar(Moment)Overloaded.
Will format a date with different strings depending on how close to referenceTime's date (today by default) the date is. Emulates: http://momentjs.com/docs/#/displaying/calendar-time/
(Defined by Display.)
Public Extension MethodDateTime
Convert this moment object to a DateTime
(Defined by Parse.)
Public Extension MethodDaysInMonth
Get the number of days in this moment.
(Defined by Display.)
Public Extension MethodFrom
moment([2007, 0, 29]).fromNow(); // 4 years ago moment([2007, 0, 29]).fromNow(showSuffix: false); // 4 years Emulates http://momentjs.com/docs/#/displaying/fromnow/
(Defined by Display.)
Top
Properties
  NameDescription
Public propertyDay
Date's Day
Public propertyHour
Date's Hour
Public propertyLanguage
Local/Language to use
Public propertyMillisecond
Date's Millisecond
Public propertyMinute
Date's Minute
Public propertyMonth
Date's Month
Public propertySecond
Date's Second
Public propertyYear
Date's Year
Top
See Also